Let’s say we have the following situation in Git:
A created repository:
mkdir GitTest2
cd GitTest2
git init
Some m
git mergeyou can follow below steps
origin/master branch to feature branch# step1: change branch to master, and pull to update all commits
$ git checkout master
$ git pull
# step2: change branch to target, and pull to update commits
$ git checkout feature
$ git pull
# step3: merge master to feature(⚠️ current is feature branch)
$ git merge master
feature branch to origin/master branch
origin/masteris the remote master branch, whilemasteris the local master branch
$ git checkout master
$ git pull origin/master
$ git merge feature
$ git push origin/master