Sourcetree does not provide you with the -f flag: https://answers.atlassian.com/questions/54469/how-do-i-perform-a-forced-push-push-f-from-sourcetree
Thus, the only way to return the remote back to its original state is git revert , each of which is committed in the reverse order.
Assuming the remote is removed on commit A , and you clicked on the commit of your commit objects B , C and D , you should
git revert D git revert C git revert B git push
Clicking will work just fine since you are not modifying the transferred history, but instead clicking on a new set of changes.
If you want to shorten your call sequence to one commit, you can do
git rebase -i origin/master
and select each of your revert to be squashed . Then your push will contain only one latch, which returns D , C and B at a time.
eckes
source share