git解决冲突

编程

git commit -a -m " 1、提交了什么内容"

2、拉取并合并远程服务器代码

git pull --rebase origin develop

3、如果有冲突(需要手动解决冲突或者工具解决冲突)

rebase in progress; onto e26bb

You are currently rebasing branch "develop" on "e26bb".

(fix conflicts and then run "git rebase --continue")

(use "git rebase --skip" to skip this patch)

(use "git rebase --abort" to check out the original branch)

Changes to be committed:

(use "git reset HEAD <file>..." to unstage)

modified: src/main/java/com/controller/UserInfoController.java

Unmerged paths:

(use "git reset HEAD <file>..." to unstage)

(use "git add <file>..." to mark resolution)

both modified: src/main/java/com/service/UserInfoServiceImpl.java

4、解决所有冲突文件之后,需要执行命令 git add -A

(use "git add <file>..." to mark resolution)

git add -A

5、所有冲突解决之后,需要执行命令 git rebase --continue

all conflicts fixed: run "git rebase --continue"

git rebase --continue

6、最后看一下状况

git status

7、没问题后,提交到远程仓库

git push origin develop

以上是 git解决冲突 的全部内容, 来源链接: utcz.com/z/512853.html

回到顶部