Archives: June 2014

How to restore a branch deleted too quickly in Git?

Having still not the automatic reflexes for applying a successful Git branching model, I cleaned up my working repository a little too fast by deleting a hot-fix branch after merging it into the master branch.

$ git branch -d hotfix-2014062501 
Deleted branch hotfix-2014062501 (was 742134c).

When I came back to the development branch I was working on before the emergency, I realised that I just forgot to merge the hot-fix into it.

As often with Git, a simple solution exists. We only need the sha1 of that branch last commit, which was conveniently displayed in the output of the deletion command above, and execute this one-liner:

$ git branch hotfix-2014062501 742134c

The branch should now be back as if nothing happened:

$ git branch -v
[...]
hotfix-2014062501        742134c some helpful comment

Source

Simple and concrete visualisation of changes we can expect due to climate change.

The rape epidemic continues in India, where savages can gang rape and hang even children. Help make pressure on India's Prime Minister Modi to take immediate actions to protect India's girls and women.