Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git cherry pick changes of only one file from commit

Get the commit
git cherry-pick -n <commit>

Unstage everything
git reset HEAD

Stage the modifications you want to keep
git add <path>

Make the work tree match the index
# (do this from the top level of the repo)
git checkout .
Source by supadupaguides.medium.com #
 
PREVIOUS NEXT
Tagged: #git #cherry #pick #file #commit
ADD COMMENT
Topic
Name
2+8 =