4

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 ??

5
  • I think it is pulled..... and code is with you in your files.. Commented Nov 8, 2013 at 8:14
  • No. I can't see the extension on my branch on github.com. It's removed from there but its not getting deleted on the server where it's pulled earlier. Commented Nov 8, 2013 at 8:20
  • i think go to right click on project and go to team--> reset that (at bottom choose last radio button) that ,if you have not wrote any code in you project you do like this.. Commented Nov 8, 2013 at 8:21
  • 2
    git reset --hard HEAD^ should have removed the last commit locally too, no? And oulling just after pushing generally generates an "Already up to date".
    – VonC
    Commented Nov 8, 2013 at 9:24
  • What repositories are involved? Which git command did you issue on which repository? (It seem there are at least two local repositories and a github one.)
    – michas
    Commented Nov 8, 2013 at 9:36

1 Answer 1

6

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.