Imagine that you just committed something on your master branch, and suddendly realize that you'll have to work a bit more on it. Wouldn't it be great to have committed this last patch on a branch instead?
Git allows you to do this. You can rewind the master by one patch, while retaining the current HEAD in a new branch.
First, create a new branch (let's call it newbranch) that points at your HEAD:
git branch newbranchThen, rewind the master by one commit:
git reset --hard HEAD^That's all. You just moved your last commit on its own branch. If you want to continue working on top of it, you just have to
git checkout newbranchand start hacking.
(Now, this is a very entry-level git tip, but those kind of examples, that demonstrate what makes git different from centralized version control systems, have certainly a good pedagogical value. More to come when I have tuits.)