this post was submitted on 07 Feb 2025
733 points (99.1% liked)

Programmer Humor

33315 readers
880 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
[–] LemoineFairclough@sh.itjust.works 6 points 4 days ago (1 children)

Doesn't git status tell you what to do?

use "git add ..." to mark resolution

use "git commit" to conclude merge

I always use git status to check what is appropriate before doing anything else, since the right thing to do can sometimes be different, like after using git rebase when a break command was used vs when a squash command resulted in a conflict.

[–] Oinks@lemmy.blahaj.zone 3 points 4 days ago (1 children)

To be fair that's not the entire story, since you need to actually resolve the conflicts first, which is slightly scary since your worktree will be broken while you do it and your Linter will be shouting at you.

You may also want a dedicated merge tool that warns you before accidentally commiting a conflict and creating a broken commit.

Oh and non trivial resolutions may or may not create an evil merge which may or may not be desirable depending on which subset of git automation features you use.

Using git status often is definitely good advice though.

[–] goodthanks@lemmy.world 2 points 4 days ago

Magit for Emacs is an excellent tool for resolving conflicts.