2 ms·
If you really feel like you do have to force-push to someone else's branch, please use git push --force-with-lease origin/other_branch so you at least won
by falsedan 10y ago
If you really feel like you do have to force-push to someone else's branch, please use
git push --force-with-lease origin/other_branch
so you at least won't trash any commits your collaborator pushed after you last fetched their branch. git will see that your origin/other_branch doesn't match origin's other_branch, and will bail out so you can pull the changes and decide how to incorporate them.