This guide was created with Scribe in 2 minutes. Sign in and create your own!
How to Merge Branch to Master GitHub
|
0 step |
2 minutes
Open your Terminal or Command Prompt and navigate to the Repository containing the branch you would like to merge.
Zoom Saved
2
Type "git branch [[Enter]]" to display a list of all branches. You'll have to switch to the branch you want to merge into to successfully merge. To do this, enter the following commands:
3
Type "git add _a [[Enter]]" to add a branch to the staging area.
4
Type "git commit -m "commit message" [[Enter]]" To add the commit message.
5
Type "git checkout main [[Enter]]" To run a Git Checkout to switch to your main branch.
6
If the branch you would like to merge is behind your main branch, you'll need to do a fast-forward to catch up. To do this, Type "git pull [[Enter]]"
7
Now, you can merge your branch into the main branch. Simply type "git merge second-branch [[Enter]]"
Was this Scribe helpful? Save this document for future reference.
Save for Later
Have something to say?Create an account to leave messages for the author to see!Create an account
Feedback
This Scribe is in tip-top shape!Leave feedback if there are any issues with this Scribe