Can't believe this isn't the default and I have to configure it myself:
git config --global alias.please "push --force-with-lease"
Can't believe this isn't the default and I have to configure it myself:
git config --global alias.please "push --force-with-lease"
@zeux The reason why it's not the default is that it only works if you haven't fetched the remote ref, and is therefore deemed a somewhat dangerous option since many tools automatically fetch (i.e. VSCode) defeating the purpose of --force-with-lease.
Or at least, that's the answer I was given when I tried to add a config option to make it the default: https://lore.kernel.org/git/xmqqvan8jd[email protected]/ .