Quantcast
Channel: Making two branches identical - Stack Overflow
Viewing all articles
Browse latest Browse all 9

Making two branches identical

$
0
0

I have two branches - A and B. B was created from A.

Work on both branches continued in parallel. Work on branch A was bad (resulting in a non-working version) while work on branch B was good. During this time branch B was sometimes merged into branch A (but not the other way around).

Now I want to make branch A identical to branch B. I can't use git revert because I need to revert too many commits - I only want to revert the commits that were done on branch A but not as a result of merging branch B.

The solution I found was to clone branch B into a another folder, delete all the files from the working folder of branch A, copy the files from the temp branch B folder and add all untracked files.

Is there a git command that does the same thing? Some git revert switch I missed?


Viewing all articles
Browse latest Browse all 9

Trending Articles