You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/01-introduction/sections/installing.asc
+27-16Lines changed: 27 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,16 @@ If you want to install Git on Linux via a binary installer, you can generally do
18
18
If you're on Fedora for example, you can use yum:
19
19
20
20
[source,console]
21
-
$ sudo yum install git
21
+
----
22
+
$ sudo yum install git
23
+
----
22
24
23
25
If you're on a Debian-based distribution like Ubuntu, try apt-get:
24
26
25
27
[source,console]
26
-
$ sudo apt-get install git
28
+
----
29
+
$ sudo apt-get install git
30
+
----
27
31
28
32
For more options, there are instructions for installing on several different Unix flavors on the Git website, at http://git-scm.com/download/linux[].
29
33
@@ -58,7 +62,6 @@ It also works well with Powershell, and sets up solid credential caching and san
58
62
We'll learn more about those things a little later, but suffice it to say they're things you want.
59
63
You can download this from the GitHub for Windows website, at http://windows.github.com[].
60
64
61
-
62
65
==== Installing from Source
63
66
64
67
Some people may instead find it useful to install Git from source, because you'll get the most recent version.
@@ -68,16 +71,20 @@ If you do want to install Git from source, you need to have the following librar
68
71
For example, if you're on a system that has yum (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install the minimal dependencies for compiling and installing the Git binaries:
In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required:
77
82
78
83
[source,console]
79
-
$ sudo yum install asciidoc xmlto docbook2x
80
-
$ sudo apt-get install asciidoc xmlto docbook2x
84
+
----
85
+
$ sudo yum install asciidoc xmlto docbook2x
86
+
$ sudo apt-get install asciidoc xmlto docbook2x
87
+
----
81
88
82
89
When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places.
83
90
You can get it via the Kernel.org site, at https://www.kernel.org/pub/software/scm/git[], or the mirror on the GitHub web site, at https://github.com/git/git/releases[].
@@ -86,14 +93,18 @@ It's generally a little clearer what the latest version is on the GitHub page, b
86
93
Then, compile and install:
87
94
88
95
[source,console]
89
-
$ tar -zxf git-2.0.0.tar.gz
90
-
$ cd git-2.0.0
91
-
$ make configure
92
-
$ ./configure --prefix=/usr
93
-
$ make all doc info
94
-
$ sudo make install install-doc install-html install-info
96
+
----
97
+
$ tar -zxf git-2.0.0.tar.gz
98
+
$ cd git-2.0.0
99
+
$ make configure
100
+
$ ./configure --prefix=/usr
101
+
$ make all doc info
102
+
$ sudo make install install-doc install-html install-info
103
+
----
95
104
96
105
After this is done, you can also get Git via Git itself for updates:
`--reuseaddr` allows the server to restart without waiting for old connections to time out, the `--base-path` option allows people to clone projects without specifying the entire path, and the path at the end tells the Git daemon where to look for repositories to export.
@@ -50,7 +50,7 @@ To get it running without having to reboot, you can run this:
50
50
51
51
[source,console]
52
52
----
53
-
initctl start local-git-daemon
53
+
$ initctl start local-git-daemon
54
54
----
55
55
56
56
On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else – as long as you get that command daemonized and watched somehow.
The ``store'' helper can take a `--file <path>` argument, which customizes where the plaintext file is saved (the default is `~/.git-credentials`).
34
+
The ``store'' helper can take a `--file <path>` argument, which customizes where the plain-text file is saved (the default is `~/.git-credentials`).
35
35
The ``cache'' helper accepts the `--timeout <seconds>` option, which changes the amount of time its daemon is kept running (the default is ``900'', or 15 minutes).
36
36
Here's an example of how you'd configure the ``store'' helper with a custom file name:
0 commit comments