I'm trying to remove the 2nd commit to a repo. At this point I could just blow away the
> git log
Date: Thu Mar 22 14:02:41 2012 -0700
Initializing registry directories
Date: Tue Jan 31 21:04:13 2012 -0800
> git rebase -i HEAD~2
fatal: Needed a single revision
invalid upstream HEAD~2
> git rebase -i HEAD~1
pick c39019e Initializing registry directories
# Rebase 535dce2..c39019e onto 535dce2
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
In order to remove the topmost commit, use
git reset --hard HEAD~. Rebase is not needed since you are not removing anything in between other commits.