How to cherry pick only changes for only one file, not the whole commit

后端 未结 9 1346
萌比男神i
萌比男神i 2020-12-04 07:12

I need to apply changes introduced in one branch to another branch. I can use cherry pick to do that. However, in my case I want to apply changes which are relevant only for

9条回答
  •  死守一世寂寞
    2020-12-04 07:32

    git reset HEAD~1
    

    moves the files into pre-commit stage

    git stash
    

    removes from memory

    Now your branch is pretty clean (reverted to previous commit)

提交回复
热议问题