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

Answer by Kellen Stuart for Making two branches identical

$
0
0

The answers in this post are way too complicated for my taste.

Here's what I did:

Assuming you're on the branch you want to change

Step 1 - Make the branch the same as master

git reset origin/master --hard

Step 2 - Pull the branch that you want to be identical to

git pull origin branch-i-want-to-be-identical-to

Step 3 (optional) - Force push it to remote to overwrite the remote history

git push --force


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>