You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dawson Whitehead edited this page May 13, 2018
·
10 revisions
There are a few step to merge git branches. This is a quick start guide so you don't repeat my mistakes...
Quick Start Guide
Steps
Run git pull --all to get the most up to date copy of all branches.
Run git checkout parent_branch to switch to parent_branch.
Run git merge origin/child_branch to pull child_branch into parent_branch.
Run git push to update parent_branch with the changes from child_branch on github.
Key
parent_branch: the branch that you want to merge into. This will contain the latest versions of both branches at the end.
child_branch: the branch that you want to put into parent_branch. This branch will stay unchanged.
Notes
You can see all the branches by running git branch --all.
If you're lucky, you won't have any merge conflicts and the merge will happen automagically. However, if you see something mentioning conflicts, don't be alarmed. Just modify/delete the files that git had a problem with and then commit and push.