git revert
Last updated
What is git revert?
git revert creates a new commit that undoes the changes made by a previous commit, without altering existing history. This makes it a safe way to undo changes on a branch that others have already pulled, since it doesn't rewrite any commits. Running git revert <commit-hash> applies the inverse of that commit's changes and prompts for a new commit message.
Free resources to learn git revert
- ArticleGit Revert
- VideoGit Revert - Visualised
More in stage 13: Undoing Changes
git revert: common questions
Can I learn git revert in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain git revert in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this git revert tutorial for beginners?
It is lesson 75 of 155 in the free Git and GitHub roadmap, in stage 13, Undoing Changes. If you are new to Git and GitHub, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.