for your consideration: two git aliases that are very useful for debugging CI workflows

[alias]
oops = commit --amend --no-edit
yolo = "!yolo() { git add -- \"$@\"; git oops; git push --force-with-lease; }; yolo"
@whitequark aliasing this as 'git gha' for GitHub Actions fuckery works...Way too well
@whitequark ooh, I have that, except I call it ”yeet" insead of "yolo"
@zmz @whitequark I propose adding both. yolo with --force and yeet with --force-with-lease. If you want to get along with others participating, use yeet. If you disregard the contribution of others and don't care if they get upset, use yolo.
@interru @whitequark the difference between `--force` and `--force-with-lease` has never been relevant in practice in project I've ever worked on
@zmz @whitequark it's relevant if you work on branches that multiple people are working on. If you work alone on feature branches, it's irrelevant. But it can't hurt to use it anyway.
@whitequark I also add --reset-author for good measure (it makes the Authored Date match the Committed Date).

@whitequark

To be fair I do understand the joke, but... Why not use a actually good ci system?

Earthly is abandoned but still works OK, I still use it in my projects. I think dagger can be run on dev machines too.

@xgqt joke? where's the joke? i just use these daily now

(i have far too much shit i'm responsible for to entertain converting like a hundred workflows from gha/fja to something "better", especially seeing as some alternatives are definitely actually worse)

@whitequark I survived my run-ins with CI with one-liners and shell history search, but I might steal those ^^
@lina my shell history is 74k lines long and by gods will I refer to every one of them later

@whitequark

$ wc -l .zsh_history
37572 .zsh_history

This machine is just barely over 2 years old.

Previous:

23901 .zsh_history

Previous previous:

203517 .zsh_history

I stopped carrying it over because I realized zsh was rewriting the entire file on logout and that was slowing down closing shells...

@lina @whitequark
APPEND_HISTORY
@tthbaltazar @whitequark I have inc_append_history but there was still something making it do a full scan, it's been a while I forgot.
@lina @whitequark
full scan? what does that mean?
@tthbaltazar @whitequark I mean a linear read/write through the whole file or whatever. I forgot what it was exactly.
@whitequark @lina One of the reasons I switched to atuin. Although I stayed for a whole host of others ^^'
@[email protected] maybe we need something like a CI for the CIs
@whitequark
I do have aliases like these, but with --force-with-lease, so that if I yolo something, I do not break other's work too much.
@amael I only use it on PR branches in my fork, but also this is a good idea regardless

@whitequark unsolicited advice, sorry 🙈

- you should escape the inner quotes; right now that's actually just undoing them
- if you use `"$@"` instead of `"$*"` you'll get better support for special chars (including spaces) in file names
- you should put `--` double dashes before the list of file names in case one starts with a dash and would get passed as an option :)

also, I always used `--reuse-message HEAD` but I'm glad `--no-edit` is a thing, I'll start using that :)

@whitequark I prefer fixups these days so there's only _one_ history rewrite on such occasions. Makes it easier to check or bring back what I've already tried, too.
@whitequark using -with-lease seems antithetical to the whole "yolo" thing
@whitequark the function trick to handle args 💖