本地删除了文件但无法将更改推送到heroku

发布于 2024-11-10 10:39:34 字数 167 浏览 0 评论 0原文

我的一些文件弄乱了我的 Heroku 应用程序,所以我决定在本地删除它们。当我尝试将更改推送到 Heroku 时,它说文件已删除,但没有要提交的更改。另外,当我运行 git push heroku master 时,它说一切都是最新的,尽管我的提交显示有已删除的文件。如何推送这些更改或从存储库中删除它们?感谢您的帮助!

I had some files that were messing up my Heroku app so I decided to delete them locally. When I tried to push the changes to Heroku, it says that the files were deleted but there were no changes to commit. Also when I ran git push heroku master, it said everything was up to date although my commit showed that there were deleted files. How can I push these changes or delete them from the repository? Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

亣腦蒛氧 2024-11-17 10:39:34

我解决了同样的问题

git commit -a

i fixed this same problem with

git commit -a
送你一个梦 2024-11-17 10:39:34

我运行了 git push heroku master,它说一切都是最新的,尽管我的提交显示有已删除的文件

这确实闻起来像 DETACHED HEAD 模式,您无需在任何分支中即可进行提交。
检查 gitbranch --all 返回的内容

I ran git push heroku master, it said everything was up to date although my commit showed that there were deleted files

That does smell like a DETACHED HEAD mode, where you are making commits without being in any branch.
Check what git branch --all returns

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文