0

I am working on my project and I was pushing and committing after every change. It so happened that I used devise gem on my project and it got me errors but I sorted it out after that I got a name error stating that I don't have a user model.

The thing is I can't generate or scaffold the user model due to the devise gem name uninitialized constant error. Now I was wondering if there is any way I could get my code back from git hub. The code that I pushed before I added the device gem, then I add the user controller to it.

halfer
  • 19,824
  • 17
  • 99
  • 186
sparta
  • 1
  • 4
  • check the option suitable for u here http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit – Amit Thawait Dec 02 '13 at 09:54
  • Are you asking how to roll back to a previous commit? e.g. http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit – doctorlove Dec 02 '13 at 09:54

1 Answers1

0

If you want to remove sensitive data (from the last commit or any commit), you can follow the GitHub help page "Remove sensitive data".

But even a reset --hard + git push -f (to cancel the last commit) will change the history of your repo, and you will have to communicate about that event to your colleague, for them to properly reset their local clone.
If you are alone on that GitHub repo, however, you can force a push without much trouble at all.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250