Created
February 6, 2015 01:44
-
-
Save raym/5dabb8e89f4d0bd55473 to your computer and use it in GitHub Desktop.
commands run to move the last 4 commits to a different branch via cherry pick
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
git log -4 | grep 'commit' | awk '{print $2}' | tail -r > commits.txt | |
git co destination_branch | |
for commit in $(cat commits.txt); do git cherry-pick $commit; done | |
git log -4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment