-## Chapter 2
+## Chapter 2
A tour of git: the basics
### 2.0 Copyright
often git, but is sometimes git-core, (due to an unfortunate name
with git, meaning GNU Interactive Tools).
- * Debian
+ * Debian
apt-get install git-core
- * Fedora Core
+ * Fedora Core
yum install git
- * Gentoo
+ * Gentoo
emerge git
- * OpenSUSE
+ * OpenSUSE
yum install git
- * Ubuntu
+ * Ubuntu
apt-get install git
yet running version 1.5 or newer, it's highly recommended that you
upgrade.
- $ git version
+ $ git version
git version 1.5.3.2
#### 2.2.1 Built-in help
change to the project that was recorded. In git terminology, we
call each of these recorded events a commit.
-The fields in a record of output from “git log” are as follows.
+The fields in a record of output from “git log” are as follows.
* commit This field consists of a string of 40 hexadecimal characters.
This is a unique identifier for referring to particular commits.
* * *
-![PIC][9]
+![PIC][9]
Figure 2.1:
Graphical history of the hello repository
you probably won’t want to use sed; simply use your preferred text
editor to do the same thing.)
- $ sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
+ $ sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
The “git status” command will tell us what git knows about the files
in the repository.
then it will be there already). The initial contents of your
.gitconfig should look like this.
- # This is a git configuration file.
+ # This is a git configuration file.
[user]
name = Your Name
email = you@example.com
and "git merge"; we can run those separately to examine the changes
before applying them locally. First we do the fetch:
- $ cd hello-pull
+ $ cd hello-pull
$ git fetch ../my-hello
remote: Generating pack...
Unpacking 3 objects...
same fashion over a network connection; simply pass in a URL or an ssh
host:/path/name specification instead of a local path.
-## Appendix D
+## Appendix D
Open Publication License
Version 1.0, 8 June 1999