|
@@ -30,11 +30,41 @@ svn revert <-> git reset
|
|
|
```
|
|
|
|
|
|
## 要点
|
|
|
+
|
|
|
+### rebase
|
|
|
+方法3,包含所有内容,不过是英文的。
|
|
|
+
|
|
|
+1. 介绍
|
|
|
+ - [git rebase 使用详解](https://blog.csdn.net/chenansic/article/details/44122107)
|
|
|
+2. 深入
|
|
|
+
|
|
|
+ - [git rebase 和 git merge 的区别](https://www.jianshu.com/p/f23f72251abc)
|
|
|
+
|
|
|
+ The Golden Rule of Rebasing rebase****的黄金法则
|
|
|
+ ```
|
|
|
+ never use it on public branches(不要在公共分支上使用)
|
|
|
+ ```
|
|
|
+3. 方法
|
|
|
+ - [Merging vs. Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing)
|
|
|
+
|
|
|
+ 里面的最终解决方案
|
|
|
+
|
|
|
+ ```
|
|
|
+ git checkout feature #进入已经完成的特性分支。
|
|
|
+ git checkout -b temporary-branch #以特性分支为基础切换到临时分支
|
|
|
+ git rebase -i master #以交互方式合并主分支提交,复杂流程,这里不在描述。如果出错,可以完全废弃临时分支重新再来。做完这一步,开始进行特性验证工作。如果验证有问题。
|
|
|
+ # [Clean up the history]
|
|
|
+ git checkout master #切换到本地的对应远程的提交分支。可能时master,可能是developer,可能是其他有upsteam的分支。
|
|
|
+ git merge temporary-branch #把临时分支做好的提交内容merge回来。
|
|
|
+
|
|
|
+
|
|
|
+ git push xxx #推送到远程分支
|
|
|
+ ```
|
|
|
+
|
|
|
+### 其他
|
|
|
- [git cherry-pick 使用指南](https://www.jianshu.com/p/08c3f1804b36)
|
|
|
- unversioned gitignore added modified
|
|
|
-- [git fetch/rebase](http://www.ruanyifeng.com/blog/2015/08/git-use-process.html)
|
|
|
- [话说Svn与Git的区别](https://www.jianshu.com/p/bfec042349ca)
|
|
|
-- [git rebase 使用详解](https://blog.csdn.net/chenansic/article/details/44122107)
|
|
|
|
|
|
## 分支切换
|
|
|
```
|