I'm new with git and I don't understand one thing.
I create a repository and a master branch.
I made an initial commit with lot of files.
I created a branch "
Why mine still flat? When the pat tree start to show different branches?
It starts branching out in earnest when you are making concurrent commits on different branches.
Meaning you need to make commits both on master and dev and newbranch to see a tree.
If not, if you just had commits (even though they are in successive branches), the graph of commits remains flat.
git init . git add and commit on master: m--m--m (master)
Then create branch dev:
git checkout -b dev # add and commit on dev m--m--m--d--d--d (dev)
Finally, new branch:
m--m--m--d--d--d--b--b (newbranch) | | (master) (dev)
If you go back to master dev and makes new commits, then you start to see a tree:
git checkout master # new commits git checkout dev # new commits m--m--m--M--M (master) \ d--d--d--D--D (dev) \ b--bb (newbranch)
See it with commands like:
git log --graph --abbrev-commit --decorate --date=relative --all