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
//this is for merging into a local branch//
// checkout the branch to merge INTO
git checkout master
// merge local feature branch into master branch
git merge feature_branch_name
// checkout the branch to merge INTO
git checkout master
// merge local feature branch into master branch
git merge feature_branch_name
git status
git checkout master
git fetch
git pull
git merge X # X is the name of the branch you want to merge into the receiving branch.
$ git checkout master
$ git merge hotfix
Updating f42c576..3a0874c
Fast-forward
index.html | 2 ++
1 file changed, 2 insertions(+)