1.切换到dev分支
$ git checkout dev
Switched to branch 'dev'
Your branch is behind 'origin/dev' by 196 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
2.查看dev分支状态
$ git status
On branch dev
Your branch is behind 'origin/dev' by 196 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
3.拉取dev最新代码
$ git pull
Checking out files: 100% (292/292), done.
............
4.再次检查dev状态
$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working tree clean
5.没有新代码更新
$ git fetch
6.合并pages的远程分支,肯定是最新代码
$ git merge origin/pages
7、处理解决冲突
$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
8、解决冲突后提交
$ git commit -m '合并pages分支,tomcat启动没有问题'
[dev 921a4db04] 合并pages分支,tomcat启动没有问题
9、推送到服务器
$ git push
Counting objects: 64, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (61/61), done.
Writing objects: 100% (64/64), 7.27 KiB | 0 bytes/s, done.
$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working tree clean
10、将pages与dev同步
$ git checkout pages
Switched to a new branch 'pages'
Branch pages set up to track remote branch pages from origin
$ git status
On branch pages
Your branch is up-to-date with 'origin/pages'.
nothing to commit, working tree clean
$ git merge origin/dev
Checking out files: 100% (256/256), done.
Updating 4531a50d1..921a4db04
Fast-forward
$ git status
On branch pages
Your branch is ahead of 'origin/pages' by 201 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
$ git push
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for pages, visit: