diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-08-16 08:56:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-08-16 08:56:37 +0200 |
commit | aaaf6ed10b62e888fc6a29df5e5d5f8295e25283 (patch) | |
tree | 6392ebe39056be5f093f2141bdbc0f298d76eb04 /using-git.texinfo | |
parent | making pull requests (diff) | |
download | using-git-aaaf6ed10b62e888fc6a29df5e5d5f8295e25283.tar.gz using-git-aaaf6ed10b62e888fc6a29df5e5d5f8295e25283.tar.bz2 using-git-aaaf6ed10b62e888fc6a29df5e5d5f8295e25283.tar.xz |
the trees of git
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'using-git.texinfo')
-rw-r--r-- | using-git.texinfo | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/using-git.texinfo b/using-git.texinfo index c3f8ae7..74bf8b9 100644 --- a/using-git.texinfo +++ b/using-git.texinfo @@ -54,6 +54,7 @@ Texts. A copy of the license is included in the section entitled * Introduction:: * Branching out:: * Collaborating:: +* Basic commands:: * GNU Free Documentation License:: @end menu @@ -613,6 +614,58 @@ you want to see the changes. +@node Basic commands +@chapter Basic commands + +@menu +* The trees of Git:: +@end menu + + + +@node The trees of Git +@section The trees of Git + +Git has four trees should know about +to better understand how Git works. + +The first tree you encounter is the +working directory. The tree begins +in the parent so called git directory; +the directory you executed +@command{git init} in, and contains +the directory @file{.git}. + +When you are using @command{git add} +to stage files you encounter the next +tree. This tree is called the index, +and is separate from the working +directory, when you stage a file, +you stage an edit, if you edit the +file further those changes does not +make it into the index until you +restage the file. + +When you have done some work --- +just a small logical step is recommended +--- and want to save your changes you +commit then with @command{git commit}. +This is when you encounter the third +tree, the @code{HEAD}. @code{HEAD} is +the file tree of the last commit, and +it is updated when make a commit. + +The fourth tree is not a file tree, +it is the commit tree. The important +thing with Git is that this tree is +not linear, it is a directed acyclic +graph, so it is not really a tree, +but you can think of it as one because +you are normally only interested +in the leaves, your branches. + + + @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texinfo |