Information Technology Reference
In-Depth Information
The content of this chapter is a solid base that we will need in the chapters to fol-
low—merging and rebasing in particular. To recap, we learned:
• To create, delete, and rename branches
• To switch branches
• To commit in a current branch
• To display the history of a given branch or all branches—both with the $
git log and $ gitk commands
That's the ABC—the first step to use branches. The recipe concerning creation and
switching of branches gave you detailed information about the way git stores branches
and the information concerning which branch is current. You know two formats git
uses to store branches—loose and packed. You also know how to change from one to
the other.
Deleting branches, on the other hand, required the introduction of two terms:
merged and not merged branch. These terms are very important—they will be utilized
at length in the chapters on merging and rebasing. When in doubt, consult Figures
5-15 , 5-16 , and 5-17 for help.
We also considered branching in clones, which gave us two classifications:
• Remote branches
• Local branches
Local branches are further classified into three different types:
• Ordinary local branches
• Local tracking branches
• Remote tracking branches
You learned to create all types of local branches and thanks to the -vv parameter of
the $ git branch command, you should easily classify all the branches in your re-
pository—even if this classification is still a little vague. Remember, that commands
can be restricted to the work only on branches of a given type. For example deleting
branches with $ git branch -d or $ git branch -D works only for local
branches. These commands don't work for remote branches.
Search WWH ::




Custom Search