当前位置:   article > 正文

Git解决冲突_your branch is up to date with 'origin/dev'.

your branch is up to date with 'origin/dev'.

yxkj@yxkj ecloud-yjyp-service % clear

切换到需要合并的目标分支

yxkj@yxkj ecloud-yjyp-service % git checkout dev
Switched to branch ‘dev’
Your branch is behind ‘origin/dev’ by 3 commits, and can be fast-forwarded.
(use “git pull” to update your local branch)

拉取服务器端的代码

yxkj@yxkj ecloud-yjyp-service % git pull
Updating ec4006b…5c992e2
Fast-forward
src/main/java/com/gzedu/ecloud/yjyp/service/DTO/GroupShortInfoVO.java | 4 ++++
src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java | 6 ++++++
src/main/java/com/gzedu/ecloud/yjyp/service/entity/ProjectUser.java | 5 +++++
src/main/java/com/gzedu/ecloud/yjyp/service/feign/AnalysisServiceFeign.java | 2 ±
src/main/java/com/gzedu/ecloud/yjyp/service/feign/TrainServiceFeign.java | 9 +++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/mapper/ProjectUserMapper.java | 3 +++
src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java | 2 ++
src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectUserService.java | 8 ++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java | 26 ++++++++++++++++++++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectUserServiceImpl.java | 8 ++++++±
src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupLeaderInfoVO.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java | 32 ++++++++++++++++++++++++++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportUserTrainTotalVO.java | 5 +++++
src/main/resources/mapper/yjyp/ProjectUser.xml | 18 ++++++++++++++++++
14 files changed, 173 insertions(+), 2 deletions(-)
create mode 100644 src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupLeaderInfoVO.java
create mode 100644 src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java
yxkj@yxkj ecloud-yjyp-service % clear

合并

yxkj@yxkj ecloud-yjyp-service % git merge luowusong
Removing src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java
Auto-merging src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java
CONFLICT (content): Merge conflict in src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java
Auto-merging src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java
Auto-merging src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java
CONFLICT (content): Merge conflict in src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java
Automatic merge failed; fix conflicts and then commit the result.

查看合并状态

yxkj@yxkj ecloud-yjyp-service % git status
On branch dev
Your branch is up to date with ‘origin/dev’.

You have unmerged paths.
(fix conflicts and run “git commit”)
(use “git merge --abort” to abort the merge)

合并成功

Changes to be committed:
modified: src/main/java/com/gzedu/ecloud/yjyp/service/feign/AnalysisServiceFeign.java
modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportDistrictStudyDataVO.java
deleted: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTaskVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTotalVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportSchoolStudyDataVO.java

未合并, 然后到下面代码中找冲突的地方修改

Unmerged paths:
(use “git add …” to mark resolution)
both modified: src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java
both modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java

yxkj@yxkj ecloud-yjyp-service % git status
On branch dev
Your branch is up to date with ‘origin/dev’.

You have unmerged paths.
(fix conflicts and run “git commit”)
(use “git merge --abort” to abort the merge)

Changes to be committed:
modified: src/main/java/com/gzedu/ecloud/yjyp/service/feign/AnalysisServiceFeign.java
modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportDistrictStudyDataVO.java
deleted: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTaskVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTotalVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportSchoolStudyDataVO.java

Unmerged paths:
(use “git add …” to mark resolution)
both modified: src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java
both modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java

add操作

yxkj@yxkj ecloud-yjyp-service % git add *
The following paths are ignored by one of your .gitignore files:
ecloud-yjyp-service.iml
target
Use -f if you really want to add them.

查看是否add成功

yxkj@yxkj ecloud-yjyp-service % 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)

Changes to be committed:
modified: src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java
modified: src/main/java/com/gzedu/ecloud/yjyp/service/feign/AnalysisServiceFeign.java
modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java
modified: src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportDistrictStudyDataVO.java
deleted: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTask.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTaskVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupTotalVO.java
new file: src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportSchoolStudyDataVO.java

commit

yxkj@yxkj ecloud-yjyp-service % git commit -m “merge”
[dev 6f2343f] merge

推送代码

yxkj@yxkj ecloud-yjyp-service % git push
Enumerating objects: 52, done.
Counting objects: 100% (52/52), done.
Delta compression using up to 4 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (18/18), 1.89 KiB | 967.00 KiB/s, done.
Total 18 (delta 11), reused 0 (delta 0)
To https://codeup.aliyun.com/5f8ed17d1858a17210467b88/SHXY/ecloud-yjyp-service.git
5c992e2…6f2343f dev -> dev
yxkj@yxkj ecloud-yjyp-service % clear
yxkj@yxkj ecloud-yjyp-service % git pull
Already up to date.
yxkj@yxkj ecloud-yjyp-service % clear

切回自己分支

yxkj@yxkj ecloud-yjyp-service % git checkout luowusong
Switched to branch ‘luowusong’
Your branch is up to date with ‘origin/luowusong’.

执行合并操作

yxkj@yxkj ecloud-yjyp-service % git merge dev
Updating fbb0b27…6f2343f
Fast-forward
src/main/java/com/gzedu/ecloud/yjyp/service/DTO/GroupShortInfoVO.java | 4 ++++
src/main/java/com/gzedu/ecloud/yjyp/service/controller/ProjectController.java | 7 +++++++
src/main/java/com/gzedu/ecloud/yjyp/service/entity/ProjectUser.java | 5 +++++
src/main/java/com/gzedu/ecloud/yjyp/service/feign/TrainServiceFeign.java | 9 +++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/mapper/ProjectUserMapper.java | 3 +++
src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectService.java | 2 ++
src/main/java/com/gzedu/ecloud/yjyp/service/service/ProjectUserService.java | 8 ++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectServiceImpl.java | 25 +++++++++++++++++++++++++
src/main/java/com/gzedu/ecloud/yjyp/service/service/impl/ProjectUserServiceImpl.java | 8 ++++++±
src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupLeaderInfoVO.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/main/resources/mapper/yjyp/ProjectUser.xml | 18 ++++++++++++++++++
11 files changed, 135 insertions(+), 1 deletion(-)
create mode 100644 src/main/java/com/gzedu/ecloud/yjyp/service/vo/ExportGroupLeaderInfoVO.java
yxkj@yxkj ecloud-yjyp-service % git push
Total 0 (delta 0), reused 0 (delta 0)
To https://codeup.aliyun.com/5f8ed17d1858a17210467b88/SHXY/ecloud-yjyp-service.git
fbb0b27…6f2343f luowusong -> luowusong
yxkj@yxkj ecloud-yjyp-service %

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/399551
推荐阅读
相关标签
  

闽ICP备14008679号