正在“中止” git 拉取一些文件后
我使用 git 进行版本控制,我试图从服务器中提取代码更改。 当我运行“git pull origin master”时,在拉取一些文件后,它显示“正在中止”。 这是怎么回事,我过去 3 个月一直在 git 上工作,但没有发生这样的事情。有什么东西被损坏了吗?
也无法“git Push”,因为所有文件都没有被拉出,
如下所示:
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
sites/all/modules/examples/form_example/form_example_tutorial.inc
sites/all/modules/examples/form_example/form_example_wizard.inc
sites/all/modules/examples/image_example/image_example.info
sites/all/modules/examples/image_example/image_example.install
sites/all/modules/examples/image_example/image_example.module
sites/all/modules/examples/image_example/image_example.pages.inc
sites/all/modules/examples/image_example/image_example.test
sites/all/modules/examples/js_example/accordion.tpl.php
sites/all/modules/examples/js_example/css/jsweights.css
sites/all/modules/examples/js_example/js/ajaxy.js
sites/all/modules/examples/js_example/js/black.js
sites/all/modules/examples/js_example/js/blue.js
sites/all/modules/examples/js_example/js/brown.js
sites/all/modules/examples/js_example/js/green.js
sites/all/modules/examples/js_example/js/purple.js
sites/all/modules/examples/js_example/js/red.js
sites/all/modules/examples/js_example/js_example.info
sites/all/modules/examples/js_example/js_example.module
sites/all/modules/examples/menu_example/menu_example.info
sites/all/modules/examples/menu_example/menu_example.module
sites/all/modules/examples/menu_example/menu_example.tes
Aborting
I use git for versioning, I am trying to pull code changes from the server.
As i run 'git pull origin master', after pulling some files its showing me 'Aborting'.
Whats this about, I have been working on git past 3 months but no such thing happened. Is there something corrupted?
Also unable to 'git push' since all the files have not been pulled
its like:
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
sites/all/modules/examples/form_example/form_example_tutorial.inc
sites/all/modules/examples/form_example/form_example_wizard.inc
sites/all/modules/examples/image_example/image_example.info
sites/all/modules/examples/image_example/image_example.install
sites/all/modules/examples/image_example/image_example.module
sites/all/modules/examples/image_example/image_example.pages.inc
sites/all/modules/examples/image_example/image_example.test
sites/all/modules/examples/js_example/accordion.tpl.php
sites/all/modules/examples/js_example/css/jsweights.css
sites/all/modules/examples/js_example/js/ajaxy.js
sites/all/modules/examples/js_example/js/black.js
sites/all/modules/examples/js_example/js/blue.js
sites/all/modules/examples/js_example/js/brown.js
sites/all/modules/examples/js_example/js/green.js
sites/all/modules/examples/js_example/js/purple.js
sites/all/modules/examples/js_example/js/red.js
sites/all/modules/examples/js_example/js_example.info
sites/all/modules/examples/js_example/js_example.module
sites/all/modules/examples/menu_example/menu_example.info
sites/all/modules/examples/menu_example/menu_example.module
sites/all/modules/examples/menu_example/menu_example.tes
Aborting
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它列出的所有这些文件在您的本地分支中都不会被跟踪,因此如果您进行合并,您对这些文件所做的任何更改都将无法挽回地丢失。因此,git 不允许你进行合并。
要修复此问题,请从工作树中删除所有这些文件,或者添加并提交它们,具体取决于您是否要保留对它们的本地更改。
All those files it lists are untracked in your local branch, so if you do the merge, any changes you have made to those files will be irretrievably lost. Therefore, git doesn't let you do the merge.
To fix it, either delete all those files from your working tree or add and commit them, depending on if you want to keep your local changes to them or not.
是否跟踪本地分支机构?在 .git 文件夹中,有一个配置文件:
必须有一个您所在分支的条目才能将其推回
这里是一组关于 git 的视频教程,我们发现非常有帮助
http://www.ava.co.uk/git
Is the local branch tracked? In the .git folder there is a config file:
There has to be an entry for the branch you are on for it to be pushed back
Heres a set of video tutorials on git we found very helpful
http://www.ava.co.uk/git