Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pablocattaneo/fcb006cd04df9456041ce3c52bacd4f5 to your computer and use it in GitHub Desktop.

Select an option

Save pablocattaneo/fcb006cd04df9456041ce3c52bacd4f5 to your computer and use it in GitHub Desktop.
# git revert creates a new commit that undoes the changes from a specific commit. It doesn't remove commits from history or revert "until" a point.
# How git revert works:
# Creates a new commit that reverses the changes
# Doesn't delete or remove commits from history
# Works on specific commits, not ranges
# Important: Order matters
# Revert in reverse chronological order (newest first) to avoid conflicts:
git revert [commit hash]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment