Mercurial: How to keep some files unchanged after merge?
I need to pull changes from one branch to another, but keep some files unchanged.
For example:
> hg up -C production
...
> hg merge feature-branch
...
> hg st
M file1
M file2
M fil开发者_开发知识库e3
R file4
...
Is there a way to keep file2 unchanged and file4 not deleted, and then commit?
Using hg transplant is inappropriate in my case because there're too many commits to find what exactly to transplant.
$ hg revert -r . file2 file4
This reverts both files to how they were in the first parent of your working directory (.
).
精彩评论