News for hackers. Stuff that matters.
Re:Using Git's rerere feature to escape recurring conflict hell by robertlagrant on Tuesday June 02, 2026 @07:45PM (#48377782)
Hm - I think I follow. But say I push a commit on a branch, then realise I messed up the commit message, so I --amend and push. I know that git push will fail, but if I git push -f then it won't detect that someone else pushed to the same branch in between - it'll just silently wipe their push.

Using --force-with-lease means the git push -f will succeed if no-one's pushed in between, and fail otherwise.

There are no comments on this comment yet.