0

I have 2 branch. a branch A that was a "upgrade" branch, and a branch B that is the stable branch.

Many changes were made to branch A progressively, and many merge of B inside A were made.

Now, branch A work ok, and everything has been update, so I would like to keep all the new files and changes on certain files, but revert some to the exact version in branch B

How can I do that ?

tl;dr : I have a file in branch B that was modified and change and merged in branch A multiple time. I would like to copy the file from banch B and override the one in branch A without applying eventual change made in branch A

Bobby
  • 4,372
  • 8
  • 47
  • 103
  • How about a switch to branch B copy file and then switch back to A and past this file then just make a commit? – Crowlex Jan 23 '19 at 06:54
  • that is kind of what I am doing, but there are multiple file, It s taking some time ^^ – Bobby Jan 23 '19 at 07:00

1 Answers1

0

When at branch A, you can check-out a specific file from branch B.

That is

git checkout B file.h
Bernhard
  • 3,619
  • 1
  • 25
  • 50