rebases and merge feature branch to master.

This commit is contained in:
Hemanth.HM 2015-08-21 19:34:59 +05:30
parent 31ae908a62
commit 5d57c4f132
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,7 @@
* [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules)
* [Show all commits in the current branch yet to be merged to master](https://github.com/git-tips/tips#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master)
* [Rename a branch](https://github.com/git-tips/tips#rename-a-branch)
* [rebases 'feature' to 'master' and merges it in to master ](https://github.com/git-tips/tips#rebases-feature-to-master-and-merges-it-in-to-master)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -353,5 +354,10 @@ __Alternatives:__
git branch -m [<old-branch-name>] <new-branch-name>
```
## rebases 'feature' to 'master' and merges it in to master
```sh
git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -196,5 +196,9 @@
"title": "Rename a branch",
"tip": "git branch -m <new-branch-name>",
"alternatives": ["git branch -m [<old-branch-name>] <new-branch-name>"]
},
{
"title": "rebases 'feature' to 'master' and merges it in to master ",
"tip": "git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}"
}
]