Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Git拉入我的web服务器失败_Python_Django_Git - Fatal编程技术网

Python Git拉入我的web服务器失败

Python Git拉入我的web服务器失败,python,django,git,Python,Django,Git,在本地(Cloud9),我已经提交了对repo()的更改,但是当我在部署服务器(Pythonywhere)上执行git pull时,我得到以下错误: Updating aef1181..5d68bfa error: Your local changes to the following files would be overwritten by merge: db.sqlite3 Please, commit your changes or stash them before y

在本地(Cloud9),我已经提交了对repo()的更改,但是当我在部署服务器(Pythonywhere)上执行git pull时,我得到以下错误:

Updating aef1181..5d68bfa
error: Your local changes to the following files would be overwritten by merge:
        db.sqlite3
Please, commit your changes or stash them before you can merge.
Aborting
我已经从本地控制台(Cloud9)推送了这些更改,并在之后通过veryfing git status确保了这些更改。从长远来看,最好的方法似乎是在PythonAnywhere上更新git,同时从本地git更新它。然而,如果不再次启动新的回购协议,我将如何实现这一点?我不想改变我在蟒蛇身上已经有的东西

无论如何,在这个时候,什么是最好的可行解决方案


编辑:它与建议的链接不完全相同。我已经让我的本地开发环境向项目repo推送更新。要在PythonAnywhere上使用git存储,我也必须从那里开始。除非这意味着在本地执行隐藏?

所有这一切都意味着在生产服务器上修改了
db.sqlite3
。因此,git不确定是否可以用新代码覆盖它(因为该文件存在于您的repo中)。实际上,您只需将该文件添加到
.gitignore
,但您可以通过(在生产服务器上)运行以下命令来解决此问题:


基本上,隐藏“保存”尚未提交的修改过的文件,并允许您在合并覆盖它之后,通过再次弹出来恢复它

可能的复制不会为repo添加另一层(从生产服务器执行)。当我执行git stash时,它会说“告诉我你的情况”,这意味着我必须链接到PA的回购协议。
git stash
# do your pull
git stash pop