Skip to content

.tip

· one of the small things

Never plain force push, use --force-with-lease

--force overwrites whatever is on the remote, including a commit a colleague pushed while you were rebasing. --force-with-lease refuses if the remote has moved since you last fetched.

git push --force-with-lease

Make it an alias. The one time it saves you pays for every keystroke you ever typed.

git