Skip to content

Commit 5d57c4f

Browse files
committed
rebases and merge feature branch to master.
1 parent 31ae908 commit 5d57c4f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules)
5151
* [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)
5252
* [Rename a branch](https://github.com/git-tips/tips#rename-a-branch)
53+
* [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)
5354

5455
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
5556
<!-- @doxie.inject end toc -->
@@ -353,5 +354,10 @@ __Alternatives:__
353354
git branch -m [<old-branch-name>] <new-branch-name>
354355
```
355356

357+
## rebases 'feature' to 'master' and merges it in to master
358+
```sh
359+
git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}
360+
```
361+
356362
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
357363
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,9 @@
196196
"title": "Rename a branch",
197197
"tip": "git branch -m <new-branch-name>",
198198
"alternatives": ["git branch -m [<old-branch-name>] <new-branch-name>"]
199+
},
200+
{
201+
"title": "rebases 'feature' to 'master' and merges it in to master ",
202+
"tip": "git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}"
199203
}
200204
]

0 commit comments

Comments
 (0)