Last active
August 29, 2015 14:01
-
-
Save JesusLeon/c1816f29a3a5fa916954 to your computer and use it in GitHub Desktop.
Git solutions
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 cherry-pick -n <commit> # get your patch, but don't commit (-n = --no-commit) | |
git reset # unstage the changes from the cherry-picked commit | |
git add -p # make all your choices (add the changes you do want) | |
git commit # make the 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
# Use git rebase to set HEAD on commit bbc643cd | |
$ git rebase --interactive bbc643cd^ | |
# In the default editor, modify 'pick' to 'edit' in the line whose commit you want to modify. | |
# Make your changes and then stage them with | |
$ git add <filepattern> | |
# Now you can run to modify the commit | |
$ git commit --amend | |
# and after that to return back to the previous head commit. | |
$ git rebase --continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment