git pull说“已经最新”在撤消git pull之后 [英] git pull says "Already up to date" after undoing a git pull
问题描述
我刚在magento上安装了一个新的扩展,已经提交并推送了。它位于github的分支分支上。我使用
git pull来源分段
它只是破坏了我的网站。我需要恢复它。我没有
git push -f origin HEAD ^:staging
git reset --hard HEAD ^
git push origin staging
这会从我的分支中删除扩展名。但现在,当我使用
git pull来源分段
它显示已更新。
如何从服务器中删除此扩展程序?
如果我正确地理解了您的问题,您有三个回购
- 远程GitHub
- A本地开发
- 您的登台服务器上的本地服务
您首先更新所有回购站,然后重写了遥控器上的历史和发展历程,并尝试着进行升级。不幸的是,分段已经有了自己的历史,所以请在分段中尝试以下步骤:
git fetch
git reset - hard origin / staging
这将强制分段的历史记录也被重写。 p>
I've just installed a new extension in magento, committed and pushed. It's on a staging branch of github. I've pulled it on my staging server using
git pull origin staging
and it just broke my website. I need to revert it back. I did
git push -f origin HEAD^:staging
git reset --hard HEAD^
git push origin staging
this removed the extension from my branch. But now when I pull this branch on server using
git pull origin staging
It says "Already up to date".
How to remove this extension from the server now ??
If I understood correctly your problem, you have three repos
- A remote on GitHub
- A local for development
- A local on your staging server
You have first update all the repos, then rewritten the history on the remote and on the development and tried to pull on the staging. Unfortunately, the staging already had already its own history, so try the following on staging:
git fetch
git reset --hard origin/staging
This will force the history on staging to be rewritten as well.
这篇关于git pull说“已经最新”在撤消git pull之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!