develwoutacause’s avatardevelwoutacause’s Twitter Archive—№ 1,666

    1. …in reply to @gkalpakas
      @gkalpakas I don't remember what problem I ran into at the time. Actually trying again now, I think this works as I was hoping. [alias] uncommit = "!MSG=$(git --no-pager log --format=%B -n 1 HEAD) && git reset HEAD~1 && git commit \ --allow-empty -m \"${MSG}\" > /dev/null"
  1. …in reply to @develwoutacause
    @gkalpakas This keeps the empty commit around with the same message, so you can just do: $ git uncommit # Make changes. $ git commit --amend Works like hg uncommit --keep, which is what I was hoping for. I'll have to try this out a bit and see how it works out in practice.😁