How to Recover a Mistakenly Deleted Branch
Workflow
git checkout -b _new_branch_name
# do some work and commit changed
git checkout master
git branch -d _new_branch_name
# doh... i meant to merge first
Fortunately, you can easily recover from this mistake.
git reflog
395b1ea HEAD@{0}: checkout...
Written by Sean Behan on 06/17/2012
How to Remove Your Last Git Commit
Remove your last commit (if you haven't pushed yet)
git reset --hard HEAD~1
To see changes that have been committed and their position in HEAD
git reflog
And to undo your previous reset and advance the cursor to the reference immediately behind the cu...
Written by Sean Behan on 06/17/2012
Have Git Email Committers After Pushes
You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default.
apt-get install sendmail
Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from
# vim /et...
Written by Sean Behan on 06/17/2012