Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

merge source code using sourcetree

HimmatPatel November 3, 2015

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

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2015

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. 

HimmatPatel November 5, 2015

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 

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2015

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
TAGS
AUG Leaders

Atlassian Community Events