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 |
Explain git stash, pop?
What work is restored when the deleted branch is recovered?
Can you explain the gitflow workflow?
Explain the advantages of forking workflow?
Distinguish between git fetch and git pull?
What is the function of ‘git stash apply’?
How can you use git bisect to determine the source of a (regression) bug?
Explain the difference between reverting and resetting.
What does ‘hooks’ consist of in git?
What is GIT stash?
What are the advantages of using GIT?
Why is it desirable to create an additional commit rather than amending an existing commit?