Last active
February 6, 2017 12:16
-
-
Save SunnyRaj/d12a2c8626f686b8f4949a075bab99e5 to your computer and use it in GitHub Desktop.
Git track remote and merge
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
# This will track all remote branches | |
for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done | |
git checkout <your_branch> | |
git merge <branch_you_want_to_merge_into_yours> | |
# If you want to automatically select their version on conflict | |
# git merge --strategy-option theirs <branch_you_want_to_merge_into_yours> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment