Git master code into the dev

dev branch to master git merge

If we are now on the dev branch, has just completed development projects, execute the following command

git add .
git commit -m ‘dev'
git push -u origin dev

Then we want to dev branch code merged into the master branch, how?
First switch to the master branch

git checkout master

If people need to develop the code, then pull down on the remote master

git pull origin master

If you own a development is not necessary, for the period of insurance or pull

Then we dev branch code is merged into the master

git merge dev

Then view status

git status
On branch master
Your branch is ahead of 'origin/master' by 12 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean

The above means that you have 12 commit, need to push to the remote master
execute the following command to

git push origin master
Published 146 original articles · won praise 66 · views 50000 +

Guess you like

Origin blog.csdn.net/qq_38923792/article/details/104975312