提交 c2ead2c4 编写于 作者: RunAtWorld's avatar RunAtWorld

gitcmd 重置仓库

上级 8f822edb
......@@ -54,12 +54,13 @@ git checkout -b dev #创建并切换到分支dev
1. 删除分支
```
git branch -d {branch4} #删除一个本地分支branch4
git branch -d branch4 #删除一个本地分支branch4
git push origin --delete branch4 #删除远程分支branch4
```
1. 合并分支
```
git merge {branch4} #当前分支合并至branch4分支的HEAD指针处
git merge branch4 #当前分支合并至branch4分支的HEAD指针处
```
1. 查看分支
......@@ -123,6 +124,7 @@ git push origin --tags #将所有tag 一次全部push到github上
```
git tag -d v1.0 #删除本地tag
git push origin :refs/tags/v1.0.0 #删除github远端的指定tag
git push origin --delete v1.0.0
```
5. 创建一个基于指定tag的分支
......@@ -146,6 +148,11 @@ git log --graph --oneline #点线图查看日志
git log --no-merges origin/dev #列出远程dev分支没有合并前的变化
```
### 重置仓库
```
git reset --hard <指定版本>
```
# Git各个状态之间转换指令总结
![Git各个状态之间转换指令总结](./gitcmd_files/1352126739_7909.jpg) <br>
**工作区**:就是你在电脑里能看到的目录。<br>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册