我刚刚将develop
合并到我的功能分支中(通过git merge develop
),并遇到了大约20个合并冲突。果然当我执行git status
时,我看到的输出如下:
new file: src/test/resources/com/example/mapper/test/TestAccountMapper.xml
new file: src/test/resources/vc-import-data/DATAFILE-unwrapped.xml
new file: src/test/resources/vc-import-data/DATAFILE.xml
Unmerged paths:
(use "git add <file>..." to mark resolution)
both added: src/main/java/com/example/bean/Account.java
both added: src/main/java/com/example/bean/Address.java
both added: src/main/java/com/example/bean/Customer.java
both added: src/main/java/com/example/mapper/AccountMapper.java
both added: src/main/java/com/example/mapper/CountryMapper.java
both added: src/main/resources/com/example/mapper/AccountMapper.xml
both added: src/main/resources/com/example/mapper/AddressMapper.xml
both added: src/main/resources/com/example/mapper/CustomerMapper.xml
both modified: src/main/resources/endpoints.properties
both added: src/test/java/com/example/mapper/AccountMapperTest.java
both added: src/test/java/com/example/mapper/CustomerMapperTest.java
both modified: src/test/resources/test-endpoints.properties
我现在遍历了每个有冲突的文件,并手动合并了所有内容。我可以只做git add . && git commit -m "Resolved merge conflicts" && git push
吗?还是我需要做其他事情(如果需要,按什么顺序)?
答案 0 :(得分:1)
您可以这样做 git add --all, git commit -m“评论”,然后 git push原点功能