albertsha
albertsha

Reputation: 197

How to git undo merge for file

in git. I'm looking for the best aproach to merge master into feature branch, yet, to skip on files [path_to_file_a]/a and [path_to_file_b]/b

ideas ?

Thx.

Upvotes: 1

Views: 246

Answers (1)

Will
Will

Reputation: 7017

One approach:

git log
# "q" to quit
# note the first commit hash (for HEAD commit), let's call it <hash>
git merge master
git checkout <hash> [path_to_file_a]/a
git checkout <hash> [path_to_file_b]/b

To commit the result:

git commit -a

Upvotes: 1

Related Questions