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.
Loading...
Related Quiz
- How does integrating a code quality tool in the Git workflow enhance the development process?
- In migrating a large codebase to Git, what factors influence the choice of using a monorepo versus multiple smaller repositories?
- The git _______ command is used to change a commit message that hasn't been pushed yet.
- In a distributed version control system like Git, each contributor has a local copy of the ________.
- What are the challenges of using Git in conjunction with build automation tools?