shangban 发表于 2018-1-11 06:13:04

gitlab的使用方法

  Add existing repo to gitlab:
  

git init  touch README
  
git add README
  
git commit -m "first commit"
  
git remote add origin git@gitlab.com:yourname/your_file.git
  
git push -u origin master
  

  

  If error "fatal: remote origin already exists" occurs:
  Seems like remote origin is already there somehow and you want to change its uri to another value. You can't add origin since its already there but you can update it. Instead of git remote add command, you can run:
  

git remote set-url origin git@gitlab.com:yourname/your_file.git  

  
页: [1]
查看完整版本: gitlab的使用方法