I am using git to track my commits in a Drupal 7 site. I was involved in a project which uses git to move between production and development server. I made some changes in features and pushed it to the production server. I now notice the following error:

The website encountered an unexpected error. Please try again later.

I am sure this is because of some feature errors, but at the same time I am not sure what feature caused this to happen.

I want to know is there a possible way to remove the commits by date. Like remove commits from 25th may? or Set header before 25th may?

  • 4
    -1 for question not related to Drupal 7 Jun 8, 2012 at 9:49
  • 2
    @Slasengger: Given it appears you only have one StackExchange(SE) account, it's possible you don't know about Stackoverflow; this is likely where GIT questions would be a better fit on that SE. My suggestion would be to have kiamlaluno move your question to that SE instead of closing it since it appears you didn't know GIT questions would be outside of the topics covered within Drupal.
    – blunders
    Jun 8, 2012 at 15:07

1 Answer 1


To revert a very simple commit, this is enough:

git revert ba24a3fdeae4a3a034691308171d798d2ddbf93e

here that long string of characters is the ID of the commit you are reverting.

To get the ID of the commit see the git log.