How does the merge work?

17

I created another branch as a backup and I give merge to it, suppose I am in branch daniela3 :

git merge origin/develop

Only my branch daniela3 will be affected or origin/develop too? I mean, I'll be joining what you have in origin/develop - > daniela3 and origin/develop remains without my changes OR are both updated?

    
asked by anonymous 02.03.2015 / 14:55

1 answer

13

Only the repository that you are is updated (in this case it should be daniela3 if I understood correctly). If you want another repository to be updated (not that it seems to be your case) you will have to make a push to it.

Then merge is always local. When you want to update another repository you bring your content to your current local repository, it does merge and sends the contents of your repository back to the original, possibly remote, repository.

The merge only acts on the current repository by considering the differences for the specific repository that is connected. Any other branches are not considered. If you need to consider other braches , these should be merged before in the repository due.

    
02.03.2015 / 15:21