How to Undoing Mistakes?

Submitted by Rajasekhar on Sat, 11/10/2018 - 13:10
  1. Sometimes when programming, we introduce bugs that break the software we work on. Git can be used to easily revert the change that broke the program.
    • Identify the commit to be reverted
    • Use Git revert to undo the mistake
    • Commit the revert
  2. Sometimes, we need to correct errors in commits. Either by editing the message or by modifying its contents. We can also completely undo a commit or commits.
  3. git revert commit_ID (syntax).