Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force a push with SourceTree

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

like image 288
Michael Rose Avatar asked Feb 07 '12 17:02

Michael Rose


People also ask

Can not push Sourcetree?

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.

What is Force Push in git?

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.

What is push pull and commit in Sourcetree?

"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"...


1 Answers

In SourceTree 3 you can allow it in the advanced tab:

enter image description here

like image 101
Display Name Avatar answered Sep 24 '22 18:09

Display Name