this post was submitted on 26 Aug 2023
6 points (100.0% liked)

Programmer Humor

32373 readers
566 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
[–] homoludens@feddit.de 0 points 1 year ago (3 children)

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

[–] joby@programming.dev 0 points 1 year ago (2 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@lemmy.world 0 points 1 year ago (1 children)

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

[–] squaresinger@feddit.de 0 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.