命令:
//远程仓库已删除分支,本地git branch -a还会有缓存分支信息,使用:
git remote prune origin
//删除本地分支
git branch -d/-D <分支>
//删除远程分支
git push origin --delete <分支>
//新建tag并推送
git tag -a <版本> -m ""
git push origin
//查看git提交版本
git log
//回退版本
git reset --hard <版本号>
//强推
git push -f
## 在本地新建一个temp分支,并将远程origin仓库的master分支代码下载到本地temp分支;
$ git fetch origin master:temp
## 比较本地代码与刚刚从远程下载下来的代码的区别;
$ git diff temp
## 合并temp分支到本地的master分支;
$ git merge temp
## 如果不想保留temp分支,删除;
$ git branch -d temp
//已有本地分支创建关联
git branch --set-upstream-to origin/远程分支名 本地分支名
##拉取指定远程分支
git checkout -b 本地分支名 origin/远程分支名
//常用基础
git branch -a
git branch <分支>
git checkout
git checkout -b <分支>
git merge <分支>
git push
git pull
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。