this post was submitted on 04 Apr 2024
1115 points (98.1% liked)
Programmer Humor
19623 readers
4 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Imagine rewring history
History is written by the squashers.
Imagine working with a tangled spaghetti of history
You don't? Just follow the merges.
You try to pull someone's changes, but whoops, they used rebase and rewrote history! Delete the branch and start over.
No you just do a rebase to bring it in. Assuming you’re making atomic commits you shouldn’t have a ton of merge conflicts. If you have to do this a lot, your branch scope is really bad and the problem isn’t in how you’re using got, it’s in how you’re slicing work.
If you try to pull someone else's rebased / history rewritten branch, your git will tell you that it's rejected. You can completely avoid this by merging instead of rewriting history.
...or you simply rebase the subset of commits of your branch onto the rewritten branch. That's like 10 simple button presses in magit.
2 things:
git pull --rebase
. Works without issue.