1

I am using sublime text2 and have screwed up my codes. I will like to revert to my previous codes on Sublime text2 from github so I can go back to codes from my previous commit.

How do I go about doing that?

Steven L
  • 131
  • 1
  • 3
  • 10
  • You can `pull` from GitHub or delete your last commits on your local branch. Check this [post](http://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit) – AbM Feb 17 '14 at 02:44

2 Answers2

1

git reset --hard HEAD should do it.

t56k
  • 6,769
  • 9
  • 52
  • 115
1

reset to particular commit use this command "git reset --hard COMMIT-SHA". COMMIT-SHA is the hash of that particular commit which you will be able get through git logs or by using any tools like gitg, git gui etc. This will reset you code and also remove all the commits after COMMIT-SHA commit please take care of it

Anant Kolvankar
  • 1,050
  • 9
  • 10