Last active
September 27, 2018 00:35
-
-
Save pocheptsov/6b2e531cd988b0d4379e5e16f9d07172 to your computer and use it in GitHub Desktop.
Rebase feature branch on top of squashed feature-base branch commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# optionally set editor to the modern https://github.com/zyedidia/micro editor | |
git config --global core.editor micro | |
# find next commit after common commit of the long running side branches | |
COMMON_COMMIT="$(git merge-base long-running-feature-branch feature-branch-development)" | |
# get next to common commit | |
git log --pretty=format:"%h" "$COMMON_COMMIT...feature-branch-development" | tail -n1 | |
> 50b1ed6 | |
git checkout feature-branch-development | |
# drop all commits before commit from the prev command | |
git rebase --interactive master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment