It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

merge source code using sourcetree


I am a new in sourcetree product. i am trying to push my local branch called "X" source code to "develop" branch. i did all the step right way.

what i did steps are:

  1. create a file  in local branch "X"
  2. stage and commit.
  3. click on push to add file into "develop" branch.
  4. But My file was not added in "develop" branch.

    Basically, i want to add new create file from branch "X" to "develop".


1 answer

Push is not the right operation for what you are trying to do. Your first two steps are correct. Picking up from there:

3. Checkout the "develop" branch.
4. Merge branch "x" into your current branch ("develop").
5. If the merge doesn't commit automatically, resolve conflicts then commit. 

The Push operation is designed to take the changes you've made to a local branch, and copy them to the remote version of the same branch. You can technically push changes to a different branch, but it is still pushing to the remote version of the branch you chose. I've never done this, so I don't know the details of how it works. 

So, if i want to add any new file into develop branch from my local "ABC" folder  then what are the steps involve:

Can you please explain me.

i appreciate your help on this.


Thank you 

1) Checkout the develop branch 2) Make the changes you want to make 3) Commit the changes 4) Push you local develop branch to remote If you haven't yet, check out the documentation at Pay extra attention to Sections 1.1 - 1.3 and Chapters 2 and 3

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,537 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you