git

git config user.name

git config user.email

git config (--global) user.name "your name"

git config (--global) user.email "your email"

git init

git add -A

git commit -am "备注"

git status

git diff

git log

git reflog

git reset --hard commit_id

git reset --hard HEAD^

git checkout .

git branch

git branch <name>

git checkout <name>

git checkout -b <name>

git merge <name>

git branch -d <name>

git remote -v

git pull

git push(git push origin master)

git remote add origin git:gitee.com:WangLiQun/fileName.git

git remote rm origin

git clone git://gitee.com/Wangliqun.git

 

git push origin -d remoteBranchName //删除远程分支git push origin :remoteBranchName

git branch -D localBranchname //强制删除本地分支

 

git push <远程主机名> <本地分支名>:<远程分支名>

git branch --set-upstream origin/remoteBranchName localBranchName //远程分支和本地分支建立关系

git push --set-upstream origin remoteBranchName //新建并关联到远程分支

 

 

 

未完待续~~

posted @ 2018-01-12 21:30  王利群  阅读(74)  评论(0编辑  收藏  举报