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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,360 views 13 14
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you