Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to revert previous commit in git?



How to revert previous commit in git?..

Answer / Nidhi Singh

To revert a specific commit in Git, first checkout the parent commit of the commit you want to revert using `git checkout <parent_commit>`. Then create a new commit with the changes from the parent commit (without the changes introduced by the commit you want to revert) using `git commit --amend`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

Mention some of the best graphical GIT client for LINUX?

1 Answers  


What is git fork? How to create tag?

1 Answers  


What are the benefits of using version control system?

1 Answers  


How git instaweb is used?

1 Answers  


What is a repository in GIT?

1 Answers  


What is a ‘conflict’ in git?

1 Answers  


What is ‘git status’ is used for?

1 Answers  


What does ‘hooks’ comprise of in git?

1 Answers  


What is the difference between ‘git remote’ and ‘git clone’?

1 Answers  


How to rebase master in git?

1 Answers  


Why GIT better than Subversion?

1 Answers  


Mention the various git repository hosting functions.

1 Answers  


Categories