Answers for "git cherry pick only part of a commit"

0

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!
Posted by: Guest on January-07-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language