1.create a new repository on the command line
-
git init
-
git add .
-
git commit -m "first commit"
-
git remote add origin
-
git push -u origin master
2.push an existing repository from the command line
-
git remote add origin
-
git push -u origin master
3.create a new branch on the command line
-
git checkout -b iss114
-
git add ./ssh_check_deny.sh
-
git commit -m 'ssh_check'
-
git remote add origin
-
git push -u origin iss114
4.merge a branch on the command line
-
git branch
-
git checkout master
-
git merge iss115
-
git remote add origin
-
git push -u origin master
5.delete a remote/local branch on the command line
-
git push origin :iss114 #delete remote branch
-
git branch -r -d origin/iss114 #delete local branch
6.record updates in local repository on the command line
附注:提交代码报错时,很大几率用到的命令git remote rm origin.
阅读(1263) | 评论(0) | 转发(0) |