In git, a branch is a just a pointer to a certain revision. At any point, you can go back to any old revision (git checkout [revision]
), point another branch at it (git checkout -b new-branch
), and start working from that point onwards.
You can use the gitk
command to browse the tree of branches, and you can create branches by right clicking on revisions etc. This tool often helps make what is going on under the hood clearer. (If you are on Mac OS, there is also gitx, which I can't live without)