I just learned about
git push --force-with-lease
git push -f
AFAIK there is no configuration available to tell git to always use
force-with-lease instead of
force. This seems to be a good example for a feature request; if you have no problem to dive into the git code base you could implement it yourself and submit it for review.
EDIT As it stands, this is still true in May 2016.
Until then the only option I see is, as so often, to create an
alias which serves this purpose.
To create an alias one would use
git config --global alias.<alias-name> <command>, in our case I would suggest something similar to this.
git config --global alias.pushf "push --force-with-lease"
This will create an entry in your global
.gitconfig file (which you can usually find in your home directory). After this you can simply use
git pushf to force-with-lease.
If you want to implement the feature yourself but aren't sure where to start, you should at first take a look at the documentation directory in the git repository. Here you can find the coding guidelines and information on how to submit patches.
You can find all this links and more on the offical community page.