git pull says “Already up to date” after undoing a git pull

依然范特西╮ 提交于 2019-12-05 18:21:11

If I understood correctly your problem, you have three repos

  1. A remote on GitHub
  2. A local for development
  3. 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!