Uzumaki Naruto
Uzumaki Naruto

Reputation: 753

What does "merge branch" means in git using source tree

I am new to repositories , git and source tree but it is the requirement to use them right now. So I started using it. We have been pushing the code to the master branch since we started working. Now we have two interns working for us and they messed up the code a few times in master, So I created a new branch on bitbucket for them as "testing" and asked them to work in that. Now when ever a task is completed and tested by them I want their (interns) code from "testing" branch to merge into master without affecting any other files in master.

I wanted to know what merging a branch means I have merged the master and testing branch together. What will happen now will the master be disturbed when anything is updated in testing or will it be ok so that as soon as testing gets updated I should merge it again with master to get all their tasks and code ?

Thank you very much in advance!

Upvotes: 0

Views: 5053

Answers (1)

jleach
jleach

Reputation: 7800

They can continue working on the Testing branch without affecting the master again until it is merged yet again at some later date. You can run a continuous branch like this for as long as you wish, or you can delete the branch after it's merged if you don't need it anymore.

It's common to have a few infinite branches for reasons you describe.

In this post, you can see they use a master (for released versions only), a develop (like your tester, but everyone works off there), then other branches for features, etc. Each of those branches can go on for however long and the changes can be rolled back independently per branch back to it's latest merge point:

http://nvie.com/posts/a-successful-git-branching-model/

I also recommend downloading a copy of Pro Git by apress. It's free and quite informative, read the first three chapters and you should have commit pointers down, which explains your answer in full.

https://git-scm.com/book/en/v2

Upvotes: 3

Related Questions