this post was submitted on 26 Aug 2023
1184 points (98.4% liked)

Programmer Humor

32710 readers
16 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 30 points 1 year ago (16 children)

Two new files wouldn't create a merge conflict though (unless they have the same name)?

[–] [email protected] 24 points 1 year ago (13 children)

Git won't let the second person push if their commit history doesn't line up with the origin branch.

It should be trivial to do a git pull --rebase to move your new commit after the upstream version, but as far as I can tell, no one on my current project remembers this (or perhaps they're using gui tools or something). Our log is full of "merge origin/main onto main".

[–] nicoweio 6 points 1 year ago (2 children)

While we're at it, I like to use --autostash in addition.

[–] [email protected] 5 points 1 year ago

Uuh, thanks for that hint! I've been using git over CLI for over 10 years now and never came across that flag.

[–] kameecoding 4 points 1 year ago

i have autostash set up as part of global config

load more comments (10 replies)
load more comments (12 replies)