git checkout master # master is checked out
git pull # update local
git merge new-feature # merge branch new-feature into master
git push # changes on remote. Then checkout a feature branch
# Fast Forward Merge
# Start a new feature
git checkout -b new-feature main
# Edit some files
git add <file>
git commit -m "Start a feature"
# Edit some files
git add <file>
git commit -m "Finish a feature"
# Merge in the new-feature branch
git checkout main
git merge new-feature
git branch -d new-feature
$ git checkout master
Switched to branch 'master'
$ git merge <your brach name>
git merge branch_name_to_merge_into_current_branch
git merge [alias]/[branch]
Incorporates changes from the named commits (since the time their histories diverged from the current branch) into the current branch. This command is used by git pull to incorporate changes from another repository and can be used by hand to merge changes from one branch into another.