Breaking a bad git habit ... Sometimes when my working directory is in a state n...

@fuzzix@mastodon.ie

Breaking a bad git habit ... Sometimes when my working directory is in a state not fit to commit, I just clone the repo again instead of stashing. I might as well be throwing the state onto the surface of Mars, as put it into the stash - out of sight, far out of mind.

New approach:

$ git commit -am "git reset HEAD~1"
$ git branch -m branchname-needs-reset

The branch name complains loudly that the last commit is rubbish, and the commit message reminds me how to fix it.

Better ideas?