this post was submitted on 04 Apr 2024
218 points (97.4% liked)

Programmer Humor

19618 readers
783 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 1 year ago
MODERATORS
 
(page 4) 46 comments
sorted by: hot top controversial new old
[โ€“] lightrush@lemmy.ca 0 points 7 months ago (1 children)
load more comments (1 replies)
[โ€“] jollyrogue@lemmy.ml 0 points 7 months ago (1 children)

git rebase is only for terrorists. ๐Ÿฅธ

Also for me when Iโ€™ve been drinking and committed some really stupid shit into the repo. No one needs to know what I really think of my team members.

[โ€“] 7heo@lemmy.ml 0 points 7 months ago (1 children)

Yeah totally merge everything, people like a good spaghetti salad.

load more comments (1 replies)
[โ€“] merthyr1831@lemmy.world 0 points 7 months ago* (last edited 7 months ago) (1 children)

Heres my based af workflow:

git checkout -b feature-branch

rebase on top of dev whilst working locally

git rebase origin/dev-branch && git push -f


if i need to fix conflicts with dev-branch during a PR

git merge origin/dev

load more comments (1 replies)
[โ€“] JoYo@lemmy.ml 0 points 7 months ago (2 children)

Anyone mind explaining to me how git rebase is worth the effort?

git merge has it's own issues but I just don't see any benefit to rebase over it.

[โ€“] Jesus_666@feddit.de 1 points 7 months ago* (last edited 7 months ago) (1 children)

I use interactive rebases to clean up the history of messy branches so they can be reviewed commit by commit, with each commit representing one logical unit or type of change.

Mind you, getting those wrong is a quick way to making commits disappear into nothingness. Still useful if you're careful. (Or you can just create a second temporary branch you can fall back onto of you need up your first once.)

[โ€“] bamboo@lemmy.blahaj.zone 0 points 7 months ago (1 children)

This 100%. I hate getting added to a PR for review with testing commits in the history, and I'm expected to clean those up before merging into main.

load more comments (1 replies)
[โ€“] Aux@lemmy.world 0 points 7 months ago (1 children)

Well, rebase allows you to resolve the same conflict ten times in a row instead of doing it once. How cool is that?

[โ€“] jjjalljs@ttrpg.network 0 points 7 months ago (1 children)
[โ€“] rapist1@lemmy.world 1 points 7 months ago

Doesn't this defeat the purpose, may as well merge then no?

load more comments
view more: โ€น prev next โ€บ