Book Image

Git Version Control Cookbook

Book Image

Git Version Control Cookbook

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Recovering from Mistakes

In this chapter, we will cover the following topics:

  • Undo – remove a commit completely

  • Undo – remove a commit and retain the changes to files

  • Undo – remove a commit and retain the changes in the staging area

  • Undo – working with a dirty area

  • Redo – recreate the latest commit with new changes

  • Revert – undo the changes introduced by a commit

  • Reverting a merge

  • Viewing past Git actions with git reflog

  • Finding lost changes with git fsck