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.
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.
Doesn’t
git status
tell you what to do?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 usinggit rebase
when abreak
command was used vs when asquash
command resulted in a conflict.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.Magit for Emacs is an excellent tool for resolving conflicts.