This definition may have unintended effects. For example, suppose you have two branches, "stable" and "New-idea", with their tops in versions E and F: A-----C----E ("stable") B-----D-----F ("New-idea")
So submissions (commits) A, C and E belong to "stable", while a, B, D and F belong to "New-idea". If you then use the following command to merge "New-idea" into "stable": git checkout Stable # change to work on the branch ' stable ' git merge New-idea # merge in "New-idea"
... Then you'll get this: A-----C----E----G ("stable") \/B-----D-----F ("New-idea")
If you continue to submit in the "New Idea" and "stable" branches, you will get: A-----C----E----G---H ("stable") \/B-----D-----F----I ("New-idea")
So now A, B, C, D, E, F, G and H belong to "stable", whereas A, B, D, F and I belong to "New-idea". Of course, the branch does have some special properties--most importantly, if you work on a branch and create a new commit (commits), the top of the branch will advance to that commit (commits). That's what you want. When merging with git merge , you just specify the merged branch to merge into the current branch and the current progress of the current branch. |