Git pull - error:以下未跟踪的工作树文件将被合并覆盖: [英] Git pull - error: The following untracked working tree files would be overwritten by merge:
问题描述
当我在监视服务器上每60秒做一次git pull时,我总是收到此错误。我正在使用厨师和一个python脚本每隔60秒就拉扯一下。
更新70fe6e8..2da34fc
错误:以下未跟踪工作树文件将被合并覆盖:
rtb_redis_connections / redis_connections.pyc
请在合并前移动或移除它们。
正在取消
我该怎么处理?这些pyc文件不断被创建。
我的猜测是有人意外提交了这个文件。如何解决这个问题:
删除您的本地.pyc文件
rm rtb_redis_connections / redis_connections.pyc
执行
git pull
从git中移除文件并推送
pre $ g $ r $ rtb_redis_connections / redis_connections.pyc
git commit -m删除pyc文件
git push origin master
假设您正在使用主分支。
I keep getting this error when I do a git pull every 60 seconds on my monitoring server. I am using chef and a python script to "git pull" every 60 seconds.
Updating 70fe6e8..2da34fc
error: The following untracked working tree files would be overwritten by merge:
rtb_redis_connections/redis_connections.pyc
Please move or remove them before you can merge.
Aborting
How do I deal with this? these pyc files keep getting created.
My guess is that someone else has accidentally committed this file. How to resolve this:
Remove your local .pyc file
rm rtb_redis_connections/redis_connections.pyc
Do the pull
git pull
Remove the file from git and push up the changes
git rm rtb_redis_connections/redis_connections.pyc
git commit -m "Remove pyc file"
git push origin master
Assuming that you are working on the master branch that is.
这篇关于Git pull - error:以下未跟踪的工作树文件将被合并覆盖:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!