O'Reilly logo

Pragmatic Version Control Using Git by Travis Swicegood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Reflog

One of the key tenets that Linus set for Git was that it had to be safe. Being nondestructive means you have to be able to get back to any state in the repository, and to do that, you need to have some mechanism for tracking the changes in state.

The normal history of a repository will protect you in all but the most extreme cases with a normal version control system. Git allows you to do things that most VCSs can’t. Changing the order of commits, breaking one commit into multiple commits, removing commits, adding extra ones—these are all tasks that Git does that a VCS like Subversion or CVS can’t.

Of course, with all this power comes some risk. What happens when you accidentally delete a branch using git branch -D or a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required