Skip to content

Instantly share code, notes, and snippets.

@srdjanmarjanovic
Forked from b-b3rn4rd/example.git
Created February 12, 2019 17:51
Show Gist options
  • Save srdjanmarjanovic/a00ed04d0faf50030422e71f8c15b4e2 to your computer and use it in GitHub Desktop.
Save srdjanmarjanovic/a00ed04d0faf50030422e71f8c15b4e2 to your computer and use it in GitHub Desktop.
Moving pushed commit from one branch to another
// moving 71b8026 from features/project-part-2 to features/project-part-1
git checkout features/project-part-2
git revert 71b8026
// for sanity check can run git diff to between branched for particular file(s)
git difftool features/project-part-2..features/project-part-1 -- ./website/app/controllers/ExampleController.php
git push origin features/project-part-2
git checkout features/project-part-1
git cherry-pick 71b8026
git push origin features/project-part-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment