gitlab新建Project後常用提交方式

  • Git global setup 全局設置
git config --global user.name "youname"
git config --global user.email "[email protected]"
  • Create a new repository 創建倉庫
cd sip-custom-front
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
  • Push an existing folder 提交已經存在的文件
cd existing_folder
git init
git remote add origin http://gitlab.gzmpc.com/zxj_fb/sip-custom-front.git
git add .
git commit -m "Initial commit"
git push -u origin master
  • Push an existing Git repository 提交一個已有其他git提交記錄的倉庫
cd existing_repo
git remote rename origin old-origin
git remote add origin http://gitlab.youcompany.com/youname/you-project.git
git push -u origin --all
git push -u origin --tags
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章