Git Reference Log

I’ve been using git svn for a number of months to interact with a subversion repository. In order to get remote commits the command git svn rebase is used; to commit local changes back into subversion the command git svn dcommit is used. 99% of the time they work every time. 1% of the time, git gets confused and doesn’t leave the local repository in a good state. Luckily, there’s git reflog.

The git reflog command lists the entire commit history for the current branch. This is extremely useful because you can see the commit hash for the last sane revision and simply reset the current branch to that commit.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s