git 使用常见问题汇总

来源:互联网 发布:麦克雷爆头伤害数据 编辑:程序博客网 时间:2024/06/01 08:06

1.git在pull时,出现这种错误的时候:

error: The following untracked working tree files would be overwritten by merge:

.DS_Store

其实你看错误提示就知道了,是因为一些untracked working tree files引起的问题。所以只要解决了这些untracked的文件就能解决这个问题。

解决有两种方式:

方式一:如果你有安装git的工具,当然是图形化工具,比如tortoiseGit,你可以通过这些工具,选中你的工程文件夹,右键cleanup。

方式二:通过命令行,你直接执行git clean -d -fx即可。可能很多人都不明白-d,-fx到底是啥意思,下一篇关于git的文章会介绍下git clean相关的东西


后续更新中。。。。。。。

0 0