我知道如何解决这个问题:
user@host$ git pull
Updating 9386059..6e3ffde
error: Your local changes to the following files would be overwritten by merge:
foo.bar
Please, commit your changes or stash them before you can merge.
Aborting
Run Code Online (Sandbox Code Playgroud)
但是,是不是有办法让git pull做stash和pop舞蹈给我吗?
如果此命令具有不同的名称,则可以.
创建shell别名git stash; git pull; git stash pop是一种解决方案,但我寻找更好的解决方案.
使用Visual Studio代码我注意到,如果您正在使用的文件发生更改,只要该文件集中在代码面板中,它就会从磁盘重新加载(如果您没有通过VSCode对文件进行更改).
但是,如果您在该文件上,则不会警告您有关文件更改的警告.
我一直在审查设置,我找不到像visual studio选项:
检测何时在环境外更改文件
所以我的问题是:是否有任何隐藏的设置或一些黑客来发出警告.
更新
在Visual Studio Code 0.3.0版中解决.