Git understands that humans are not perfect, and that often we want to change our minds about what we did. To help with this, git offers many tools to undo our changes and even change history. The trick is knowing when to use which tool.| Git Cookbook