Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git cherry pick parts of a commit

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!
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #cherry #pick #parts #commit
ADD COMMENT
Topic
Name
3+1 =