Maven / GIT Interview Questions
Explain git revert command.
The git revert command is used for undoing changes to a repository's commit history. Git revert expects a commit ref passed in. To revert the latest commit use git revert HEAD command.
git revert simply creates a new commit that is the opposite of an existing commit. So a git push need to be followed to update in remote repository.
More Related questions...
git fsckcommand. How do I view the file changes (diff) before committing in GIT? Explain git blame command. What is a pull request in git? What is a .GITKEEP file?