Merge Local Branch¶
Following example merges a local branch feature/create-user
1$ git checkout main
2$ git pull
3$ git merge feature/create-user
4$ git push
Here is what the script is doing, line by line:
# Switch the current working branch to main. # Make sure local main branch is in sync sith remote branch. Optional. # Merge the feature/create-user branch with the current working branch (main) # Push changes from the local working branch main to the remote branch.
See Also¶
Basic Merging from Gitbook
Git Branching Rebasing Rebasing from Gitbook
Intro to rebase from git ready