Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.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
Django 在执行git pull之后,如何让我的Python在我的网页上进行更改?_Django_Git_Git Pull_Pythonanywhere - Fatal编程技术网

Django 在执行git pull之后,如何让我的Python在我的网页上进行更改?

Django 在执行git pull之后,如何让我的Python在我的网页上进行更改?,django,git,git-pull,pythonanywhere,Django,Git,Git Pull,Pythonanywhere,我在将代码从GitHub更新到Python Anywhere时遇到问题。我正在学习Django女孩教程。我已经更新了本地文件中的一些代码,并使用新提交推送到GitHub。我可以在Github存储库中看到更改。然后我在Python Anywhere上尝试了git pull,我看到了以下消息: Updating ebefb9b..75b3566 error: Your local changes to the following files would be overwritten by merge

我在将代码从GitHub更新到Python Anywhere时遇到问题。我正在学习Django女孩教程。我已经更新了本地文件中的一些代码,并使用新提交推送到GitHub。我可以在Github存储库中看到更改。然后我在Python Anywhere上尝试了
git pull
,我看到了以下消息:

Updating ebefb9b..75b3566 error: Your local changes to the following files would be overwritten by merge: blog/templates/blog/base.html blog/templates/blog/post_detail.html blog/views.py mysite/settings.py mysite/urls.py Please, commit your changes or stash them before you can merge. error: The following untracked working tree files would be overwritten by merge: blog/templates/registration/login.html Please move or remove them before you can merge. Aborting.

所以我尝试了所有的方法,但仍然没有成功,直到我在stackoverflow上看到一篇帖子,上面说,
git reset--hard
git pull
之前,我应用了它,它解决了问题,但我看不到我网页上的变化。我只能看到Django安装成功网页。我已经完成了重新加载、刷新所有内容,但仍然无法获得任何帮助。

看起来像是您在Pythonywhere上所做的更改,这些更改是教程的一部分,您在运行
git reset--hard
时删除了这些更改。您必须尝试找出丢失的更改,并从教程中重新进行更改。

正在运行!我不知道我必须按下按钮才能重新加载它。我认为点击刷新按钮和重新加载是一样的。