I'm starting to study and use DVCS (versioning programs: GIT, mercurial).
I tried to reassemble a folder structure, using branches but the result was not as expected. I wanted to understand how the structure works.
What I did was as follows:
I opened a rep on gitbucket:
xyp
I have the branch master, and I created 5 branches: b1, b2, 3b, b4 and b5
I downloaded to my machine in a folder, I made a clone
, I pasted a folder [b1] inside that folder, I accessed the branch with the same branch:
git checkout -b b1
Then:
git add *
To add the new files in that branch, and then commit:
git commit -m "1 commit b1"
After pushing:
git push https://*******@bitbucket.org/*****/******.git
And I was doing so in the 5 cases imagining that I would have the following structure in the branches as the folders:
masters
b1 b2 b3 b4
But when I looked at the branches on gitbucket, the structure was all crooked:
- 1 commit b1 has 5 branches inside [b1 b2 b3 b4 b5]
- o 2 commit b2 has 4 branches inside [b2 b3 b4 b5]
- 3 commit b3 left with 3 branches inside [b3 b4 b5]
And so on. And the last one was with one, only with himself
commit b5 (b5)
Why did this strange structure not agree with what I thought and struc- tured?