I started using SourceTree a few days ago to manage Mercurial repositories with my Mac. Now I ran into the problem when pushing to my remote repository creates a new head on a new branch and I would like to force it.
However, I am not able to find any specific option in SourceTree which allows me to set the force option for a push. Is it just my inability to find it or is there no possibility to set it?
Thanks in advance Michael
It is a bug in sourcetree. A workaround for the issue is when sourcetree autofills the "Remote branch" field in the push dialog the first time pushing a new branch from local, Delete what ever sourcestree autofills and enter it manually or copy and past the previous values and the push will work.
The --force option for git push allows you to override this rule: the commit history on the remote will be forcefully overwritten with your own local history. This is a rather dangerous process, because it's very easy to overwrite (and thereby lose) commits from your colleagues.
"push" = "send a set of commits and the objects they point to to a remote"; "pull" = "copy a set of commits and referred objects from a remote"; "commit" = "create a new snapshot of the project, pointing to updated directories, files, etc. and one or more parent commits"...
In SourceTree 3 you can allow it in the advanced tab:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With