Gitlab command line instructions

妖狐艹你老母 2021-12-21 01:51 315阅读 0赞

Git global setup

  1. git config --global user.name "winner"
  2. git config --global user.email "ryjwinner@gmail.com"

Create a new repository

  1. git clone git@gitlab.xxx.xxx:sa/library.git
  2. cd library
  3. touch README.md
  4. git add README.md
  5. git commit -m "add README"
  6. git push -u origin master

Existing folder

  1. cd existing_folder
  2. git init
  3. git remote add origin git@gitlab.xxx.xxx:sa/library.git
  4. git add .
  5. git commit -m "Initial commit"
  6. git push -u origin master

Existing Git repository

  1. cd existing_repo
  2. git remote rename origin old-origin
  3. git remote add origin git@gitlab.xxx.xxx:sa/library.git
  4. git push -u origin --all
  5. git push -u origin --tags

  

 

转载于:https://www.cnblogs.com/winnerREN/p/9899821.html

发表评论

表情:
评论列表 (有 0 条评论,315人围观)

还没有评论,来说两句吧...

相关阅读