Last active
January 14, 2018 02:00
-
-
Save inspector71/c21c1ed7a6907de4461a3dbba502afa0 to your computer and use it in GitHub Desktop.
Git merge new / updated code into current branch, from another branch, keeping remote / central repo in mind
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
Git merge new / updated code into current branch, from another branch, keeping remote / central repo in mind | |
git checkout <hostOrReceivingBranch> # 1. If not already there, load the branch you'll merge code into | |
git pull origin <hostOrReceivingBranch> # 2. Update, get (pull) other people's changes to a remote or central (origin) branch | |
git merge <newOrUpdatedCodeBranch> # 3. Merge the code from your new / updated branch into the branch currently loaded | |
git push origin <hostOrReceivingBranch> # 4. Push your changes back to a remote / central (origin) branch for everyone to see |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment