Git version: 1.7.12.3
As the question states, that seems like a really bad idea to me. Without any additional flags or confirmations git push -f
will force push all of the tracking branches to remote.
If a developer has a few outdated branches, that are tracking remotes, and he executes that command, all of the tracking branches will have been rolled back to his outdated copies, which causes loss of valuable work.
This can be done accidentally, or by someone not very experienced with git. It really seems like git should do a little more hand-holding in such a dangerous case, and require an additional flag, or ask for a confirmation.
Is there a remedy for this?