git pull 错误:The following untracked working tree files would be overwritten by merge

147 阅读1分钟

$ git pull origin alpha
From github.com/shirley-wu/…
* branch            alpha      -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
.gradle/4.4/fileChanges/last-build.bin
.gradle/4.4/fileHashes/fileHashes.bin
.gradle/4.4/fileHashes/fileHashes.lock
.gradle/4.4/fileHashes/resourceHashesCache.bin
.gradle/4.4/taskHistory/taskHistory.bin
.gradle/4.4/taskHistory/taskHistory.lock
.gradle/buildOutputCleanup/buildOutputCleanup.lock
.gradle/buildOutputCleanup/cache.properties
.gradle/buildOutputCleanup/outputFiles.bin
.idea/gradle.xml
.idea/workspace.xml

 

解决方法:

git clean  -d  -fx

git pull

手动merge

git add .

git commit -m "description"