232
Fixing CI (lemmy.nz)
you are viewing a single comment's thread
view the rest of the comments
[-] pivot_root@lemmy.world 33 points 9 months ago

Solution:

git commit --amend
git push --force

Problem:

The process of discovering best practices on how to keep a clean git history is a goddamned challenge.

[-] Ephera@lemmy.ml 18 points 9 months ago

--force-with-lease* ๐Ÿ™ƒ

[-] pivot_root@lemmy.world 7 points 9 months ago* (last edited 9 months ago)

I didn't want to make it sound too scary ๐Ÿ˜‰

Seriously, though, git really needs an option to treat --force as --force-with-lease. In the exceedingly rare occasion where I might want to completely overwrite a branch, it should be extra explicit by having to type something like --force-and-overwrite.

[-] somerandomperson@lemmy.dbzer0.com 4 points 9 months ago

--force-overwrite-everything-i-know-what-the-heck-i-am-doing
just to be sure... (/j)

[-] technom@programming.dev 3 points 9 months ago

At this point, it may be a good idea to throw the entire git porcelain (frontend) away and redesign it from scratch!

[-] Ephera@lemmy.ml 3 points 9 months ago

Yeah, I virtually only use --force for moving tags around (which one could definitely argue isn't really a thing you should be doing regularly either)...

this post was submitted on 01 Jan 2026
232 points (99.6% liked)

Programmer Humor

33472 readers
2202 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS