我最近在master分支上做了一个git pull
,得到了:
warning: Cannot merge binary files: android/.gradle/buildOutputCleanup/buildOutputCleanup.lock (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/javaCompile/taskHistory.bin (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/javaCompile/javaCompile.lock (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/fileHashes/resourceHashesCache.bin (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/fileHashes/fileHashes.lock (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/fileHashes/fileHashes.bin (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/executionHistory/executionHistory.lock (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
warning: Cannot merge binary files: android/.gradle/5.4.1/executionHistory/executionHistory.bin (HEAD vs. 043656d95dc23053f85a78f5f367e312bdad9499)
Removing scripts/ios/provisions/ENGA__INT__Dist.mobileprovision
Removing scripts/ios/certs-distribution/nfib-enterprise.ios_distribution.2018-02-10.p12.password.txt
Removing scripts/ios/certs-distribution/nfib-enterprise.ios_distribution.2018-02-10.p12
Removing scripts/ios/certs-distribution/nfib-enterprise.ios_distribution.2018-02-10.cer
Removing scripts/ios/certs-distribution/nfib-company.ios_distribution.2018-01-25.p12
Removing scripts/ios/certs-distribution/nfib-company.ios_distribution.2018-01-25.cer
Auto-merging android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
CONFLICT (content): Merge conflict in android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Auto-merging android/.gradle/5.4.1/javaCompile/taskHistory.bin
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/javaCompile/taskHistory.bin
Auto-merging android/.gradle/5.4.1/javaCompile/javaCompile.lock
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/javaCompile/javaCompile.lock
Auto-merging android/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
Auto-merging android/.gradle/5.4.1/fileHashes/fileHashes.lock
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/fileHashes/fileHashes.lock
Auto-merging android/.gradle/5.4.1/fileHashes/fileHashes.bin
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/fileHashes/fileHashes.bin
Auto-merging android/.gradle/5.4.1/executionHistory/executionHistory.lock
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/executionHistory/executionHistory.lock
Auto-merging android/.gradle/5.4.1/executionHistory/executionHistory.bin
CONFLICT (content): Merge conflict in android/.gradle/5.4.1/executionHistory/executionHistory.bin
Automatic merge failed; fix conflicts and then commit the result.
我的想法还可以,我将解决每个文件中的冲突,然后执行git stash
,转到分支,将其弹出并提交,但是这些文件都没有告诉我发生了什么变化,没有选择您想要此代码的哪个版本,那么这有冲突吗?
此外,我无法在master分支上进行更改,那么我该如何处理在只读的master分支上发生合并冲突并且无法推送到其中的情况?
所以我要做的是创建一个新分支,并再次忽略那些gradle文件,但是我现在应该在分支中看到这一点吗?
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
modified: android/.gradle/5.4.1/executionHistory/executionHistory.bin
modified: android/.gradle/5.4.1/executionHistory/executionHistory.lock
modified: android/.gradle/5.4.1/fileHashes/fileHashes.bin
modified: android/.gradle/5.4.1/fileHashes/fileHashes.lock
modified: android/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
modified: android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
modified: src/events/actions.js
目前尚不清楚是应该添加修改后的.gradle/
文件还是执行git checkout
来删除它们。那么修改意味着它们现在已经被忽略了吗?