News for hackers. Stuff that matters.
Re:Git-absorb: Git commit –fixup, but automatic by masklinn on Thursday September 26, 2024 @01:30AM (#41654837)
Your alias seems like a completely unecessary complexity. If you want to meld new changes into your branch head you can just alias “git commit --amend”, you don’t need that mess.

Absorb will find the commits to fix up for each change in the working copy, it doesn’t just merge everything into the head.

Re:Git-absorb: Git commit –fixup, but automatic by johnnypangs on Thursday September 26, 2024 @05:42AM (#41656391)
I see, the reason it’s that long complicated alias was that I didn’t want to open up the editor to change the commit every time I updated. “git commit —amend” does that.

I read the rough how it works and it now makes sense. I might give it a try. Thanks!

Re:Git-absorb: Git commit –fixup, but automatic by johnnypangs on Thursday September 26, 2024 @05:43AM (#41656400)
Seems like you can add —no-edit and get the same behavior, now I can delete that alias. Thanks again :)

(Edit: typo)

Re:Git-absorb: Git commit –fixup, but automatic by masklinn on Thursday September 26, 2024 @08:07AM (#41657386)
That is correct, and there is a `--edit` to revert that, so my personal alias is to `git ci --amend --no-edit` such that by default it just merges the staging into the HEAD, and then tacking on `-e` will open the commit message in an editor to expand it.
Re:Git-absorb: Git commit –fixup, but automatic by cryptonector on Thursday September 26, 2024 @12:43PM (#41660529)
You can also set `EDITOR=true` for that `git commit --amend` if you forget about `--no-edit`.