merge source code using sourcetree

Hi,

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

    Thanks,

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 https://git-scm.com/book/ 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 Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

824 views 3 2
Read article

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