Last active
August 29, 2015 14:02
-
-
Save khalib/3627ca3c13041455e15a to your computer and use it in GitHub Desktop.
Mirror deviated branch to an existing branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Branch DEV has extra files and commits that are not needed anymore | |
| # DEV is to be a mirror of MASTER | |
| # Get the latest DEV branch | |
| git checkout DEV | |
| git pull origin DEV | |
| # Get the latest MASTER branch | |
| git checkout MASTER | |
| git pull origin MASTER | |
| # Psuedo-merge DEV into MASTER but only taking MASTER's deltas | |
| git merge -s ours DEV | |
| # Merge MASTER into DEV | |
| git checkout DEV | |
| git merge MASTER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment