A developer accidentally pushes a commit containing a critical security vulnerability. What Git feature should they use to handle this situation?

  • Revert commit
  • Amend commit
  • Git reset
  • Git stash
In this scenario, the developer should use the 'Revert commit' feature to create a new commit that undoes the changes introduced by the problematic commit. This ensures a clear history while addressing the security vulnerability without modifying the existing commit history.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *