git合并笔记

1、$ git checkout work

在要合并的目录下checkout分支

2、$ git merge dev

合并分支

Updating f08de8..494c33
Fast-forward
 .../controller/Ar***********.java              | 56 ++++++++++++++--

 .../**************.java  | 32 +++++++++

 8 files changed, 332 insertions(+), 38 deletions(-)

 create mode 100644 src/main/webapp/views/**************.jsp

3、$ git status

可以检查下状态

On branch work
Your branch is ahead of 'origin/work' by 3 commits.
  (use "git push" to publish your local commits)

nothing to commit, working directory clean

4、$ git pull origin work

拉取分支进行合并

remote: Counting objects: 24, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 24 (delta 0), reused 15 (delta 0)
Unpacking objects: 100% (24/24), done.
From http://****************************
 * branch            work       -> FETCH_HEAD
   f08de8..e1344d  work       -> origin/work
Auto-merging src/main/webapp/views/***************.jsp
CONFLICT (content): Merge conflict in src/main/webapp/views*************.jsp
Auto-merging src/main/webapp/WEB-INF/decorators.xml
Automatic merge failed; fix conflicts and then commit the result.


5、修改冲突文件,修改完成后右键Resolve

6、测试代码,确保提交代码无问题

7、提交代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值