Hacker News new | ask | show | jobs
by jackowayed 5632 days ago
git reset HEAD^ (soft is the default option) is actually pretty intuitive once you're used to git. You're reseting the index to the state it was one commit ago (which is what HEAD^ means. That comes up a lot.)

And if you really forget it often, add this to your ~/.gitconfig:

    [alias]
      rollback = reset HEAD^
Now you can run `git rollback`
1 comments

I know what HEAD^ (and HEAD^^^^^ or whatever) mean.

The fact that I have to make aliases for commonly used tasks is not a point in git's favor to me.

Do you really uncommit that frequently? I just either amend my commits or keep adding new commits and squash them later.

The point is that you can make just about any workflow with git. The ones that git users less commonly use may not be have easy toplevel commands. People already complain about how many toplevel commands there are with git.