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

错误描述:

$ git pull origin alpha
From https://github.com/shirley-wu/HeartTrace
 * 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
        app/app.iml
        app/build/generated/res/pngs/debug/drawable-anydpi-v21/ic_launcher_background.xml
        app/build/generated/res/pngs/debug/drawable-hdpi/ic_launcher_background.png
        app/build/generated/res/pngs/debug/drawable-ldpi/ic_launcher_background.png
        app/build/generated/res/pngs/debug/drawable-mdpi/ic_launcher_background.png
        app/build/generated/res/pngs/debug/drawable-xhdpi/ic_launcher_background.png
        app/build/generated/res/pngs/debug/drawable-xxhdpi/ic_launcher_background.png
        app/build/generated/res/pngs/debug/drawable-xxxhdpi/ic_launcher_background.png
        app/build/generated/source/buildConfig/debug/com/example/dell/diary/BuildConfig.java
        app/build/generated/source/r/debug/android/arch/lifecycle/R.java
        app/build/generated/source/r/debug/android/support/compat/R.java
        app/build/generated/source/r/debug/android/support/constraint/R.java
        app/build/generated/source/r/debug/android/support/coreui/R.java
        app/build/generated/source/r/debug/android/support/coreutils/R.java
        app/build/generated/source/r/debug/android/support/design/R.java
        app/build/generated/source/r/debug/android/support/fragment/R.java
        app/build/generated/source/r/debug/android/support/graphics/drawable/R.java
        app/build/generated/source/r/debug/android/support/graphics/drawable/animated/R.java
        app/build/generated/source/r/debug/android/support/mediacompat/R.java
        app/build/generated/source/r/debug/android/support/transition/R.java
        app/build/generated/source/r/debug/android/support/v4/R.java
        app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
        app/build/generated/source/r/debug/android/support/v7/cardview/R.java
        app/build/generated/source/r/debug/android/support/v7/recyclerview/R.java
        app/build/generated/source/r/debug/com/bigkoo/pickerview/R.java
        app/build/generated/source/r/debug/com/borax12/materialdaterangepicker/R.java
        app/build/generated/source/r/debug/com/contrarywind/view/R.java
        app/build/generated/source/r/debug/com/example/dell/diary/R.java
        app/build/generated/source/r/debug/com/google/android/gms/R.java
        app/build/generated/source/r/debug/com/google/android/gms/appindexing/R.java
        app/build/generated/source/r/debug/com/google/android/gms/base/R.java
        app/build/generated/source/r/debug/com/google/android/gms/tasks/R.java
        app/build/generated/source/r/debug/com/google/firebase/R.java
        app/build/generated/source/r/debug/com/prolificinteractive/materialcalendarview/R.java
        app/build/generated/source/r/debug/de/hdodenhof/circleimageview/R.java
        app/build/generated/source/r/debug/net/sqlcipher/R.java
        app/build/generated/source/r/debug/org/adw/library/widgets/discreteseekbar/R.java
        app/build/intermediates/blame/res/debug/multi-v2/values-af.json
        app/build/intermediates/blame/res/debug/multi-v2/values-am.json
        app/build/intermediates/blame/res/debug/multi-v2/values-ar.json
        app/build/intermediates/blame/res/debug/multi-v2/values-az.json
        app/build/intermediates/blame/res/debug/multi-v2/values-b+sr+Latn.json
        app/build/intermediates/blame/res/debug/multi-v2/values-be.json
        app/build/intermediates/blame/res/debug/multi-v2/values-bg.json
        app/build/intermediates/blame/res/debug/multi-v2/values-bn.json
        app/build/intermediates/blame/res/debug/multi-v2/values-bs.json
        app/build/intermediates/blame/res/debug/multi-v2/values-ca.json
        app/build/intermediates/blame/res/debug/multi-v2/values-cs.json
        app/build/intermediates/blame/res/debug/multi-v2/values-da.json
        app/build/intermediates/blame/res/debug/multi-v2/values-de.json
        app/build/intermediates/blame/res/debug/multi-v2/values-el.json
        app/build/intermediates/blame/res/debug/mul
Aborting

解决方法:

git clean  -d  -fx

git pull

手动merge

git add .

git commit -m "description"

原文地址:https://www.cnblogs.com/ustckx16/p/9251064.html

时间: 2024-10-03 23:56:00

git pull 错误:The following untracked working tree files would be overwritten by merge的相关文章

Error pulling origin: error: The following untracked working tree files would be overwritten by...

git在pull时,出现这种错误的时候,可能很多人进进行stash,相关stash的请看:Error pulling origin: error: Your local changes to the following files would be overwritten by merge 但是发现stash后还是会出现:Error pulling origin: error: The following untracked working tree files would be overwri

The following untracked working tree files would be overwritten by checkout

sourcetree拉取分支出现这个错: The following untracked working tree files would be overwritten by checkout 解决办法:git  clean -d -fx 原文地址:https://www.cnblogs.com/yqcf/p/9794688.html

git 解决 Your local changes to the following files would be overwritten by merge:

问题 同一份文件,在你提交时,有人比你更早更新了文件并上传,使你的本地文件并非最新.因此,在你想上传自己修改后的文件时,第一步git pull时,会报如下错误: error: Your local changes to the following files would be overwritten by merge: src/test/resources/application_context.xml Please, commit your changes or stash them befo

vscode 切换分支时报错:The following untracked working tree files would be overwritten .....

执行命令:git clean -d -fx   表示删除 一些 没有 git add 的 文件: git clean 参数 -n 显示将要删除的文件和目录: -x -----删除忽略文件已经对git来说不识别的文件 -d -----删除未被添加到git的路径中的文件 -f -----强制运行 原文地址:https://www.cnblogs.com/rong88/p/12172740.html

Git版本控制工具使用:Error pulling origin: error: Your local changes to the following files would be overwritten by merge

摘自: CSDN 逆觞 git在pull时,出现这种错误的时候,可能很多人进进行stash,相关stash的请看:Error pulling origin: error: Your local changes to the following files would be overwritten by merge 但是发现stash后还是会出现:Error pulling origin: error: The following untracked working tree files woul

git pull 提示错误,Your local changes to the following files would be overwritten by merge

error: Your local changes to the following files would be overwritten by merge: Please commit your changes or stash them before you merge. 解决办法: 1.服务器代码合并本地代码 $ git stash //暂存当前正在进行的工作. $ git pull origin master //拉取服务器的代码 $ git stash pop //合并暂存的代码 2.

git bash提交代码过程 以及 git pull报错 your local changes to the following files would be overwritten by merge:

git bash 平常提交代码流程: 1. 在文件根目录下鼠标右键点击空白处,选择git Base here 2. git status 查看哪些文件被修改,文件状态为 modified, 也就是被修改了,“Changes not stagged for commit”表示文件被修改但是提交前还没有被存储 3. git add 将修改添加到暂存区(git commit之前必须要执行这一步) git add . : 是将所有被修改的文件和新增加的文件,但不包括被删除的文件 添加到缓存区 git a

"Your local changes to the following files would be overwritten by merge" on git

运行: git merge --ff origin/master 得到错误信息: error: Your local changes to the following files would be overwritten by merge: dir/file1 dir/file2 dir/file3 解决办法先运行以下命令迁出远程文件: git checkout HEAD^ dir/

git pull错误

1. Pull is not possible because you have unmerged files. 症状:pull的时候 $ git pull Pull is not possible because you have unmerged files.Please, fix them up in the work tree, and then use 'git add/rm <file>'as appropriate to mark resolution, or use 'git