Explain the difference between reverting and resetting.
Answer / Sanjeev Mittal
Reverting in Git undoes specific changes by creating a new commit that cancels out the changes made by another commit. It leaves the commit history intact, which is useful for preserving information about what happened.nResetting, on the other hand, removes commits from the repository's history. This can be dangerous because it deletes data permanently. There are different ways to reset (soft, hard, mixed), but all of them affect the commit history.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is ‘head’ in git?
What is the difference between git vs svn
What is subgit?
What is GIT version control?
What is the use of ‘git log’?
What is a repository in GIT?
What is a repository and how will you create it?
What is the function of ‘git rm’?
What is “Staging Area” or “Index” in GIT?
How do you find a list of files that have changed in a particular commit?
What is GIT stash drop?
What is git fork?