Search code examples
gitatlassian-sourcetreesourcetree

SourceTree Sync feature? => auto pull before pushing if needed (fast-forwards)


How to perform a Sync (like in Github client).

I mean when you commit + immediat push, in fast-forwards cases: you have an error, then pull, then push.

I am looking for an option performing a pull automatically if needed, then push my last commit.

How to do this in SourceTree? Thanks in advance


Solution

  • You cant do it directly form within SourceTree.
    You can write script that will do it for you.

    The reason is that what will happen if you have conflicts?
    Who will resolve them?

    This is why you will need to do 2 separate tasks pull (= fetch + merge) + push

    If you ar using IDE like webStorm/IntelliJ or any other IDE from jetbrains you have a dialog in which you can commit your code and push it right away.