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/1-introduction.asc
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ At the end of this chapter you should understand why Git is around, why you shou
6
6
7
7
=== About Version Control (((version control)))
8
8
9
-
What is ((("version control"))), and why should you care?
9
+
What is "version control", and why should you care?
10
10
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
11
11
For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
12
12
@@ -34,7 +34,7 @@ RCS works by keeping patch sets (that is, the differences between files) in a sp
34
34
35
35
The next major issue that people encounter is that they need to collaborate with developers on other systems.
36
36
To deal with this problem, Centralized Version Control Systems (CVCSs) were developed.
37
-
These systems, such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place.
37
+
These systems, such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place. (((CVS)))(((Subversion)))(((Perforce)))
38
38
For many years, this has been the standard for version control.
39
39
40
40
.Centralized version control.
@@ -67,19 +67,19 @@ This allows you to set up several types of workflows that aren’t possible in c
67
67
68
68
As with many great things in life, Git began with a bit of creative destruction and fiery controversy.
69
69
70
-
The Linux kernel is an open source software project of fairly large scope.
70
+
The Linux kernel is an open source software project of fairly large scope.(((Linux)))
71
71
For most of the lifetime of the Linux kernel maintenance (1991–2002), changes to the software were passed around as patches and archived files.
72
-
In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper.
72
+
In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper.(((BitKeeper)))
73
73
74
74
In 2005, the relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked.
75
-
This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper.
75
+
This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper.(((Linus Torvalds)))
76
76
Some of the goals of the new system were as follows:
77
77
78
78
* Speed
79
79
* Simple design
80
80
* Strong support for non-linear development (thousands of parallel branches)
81
81
* Fully distributed
82
-
* Able to handle large projects like the Linux kernel efficiently (speed and data size)
82
+
* Able to handle large projects like the Linux kernel efficiently (speed and data size)(((Linux)))
83
83
84
84
Since its birth in 2005, Git has evolved and matured to be easy to use and yet retain these initial qualities.
85
85
It’s incredibly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development (See <<_git_branching>>).
@@ -89,7 +89,7 @@ It’s incredibly fast, it’s very efficient with large projects, and it has an
89
89
So, what is Git in a nutshell?
90
90
This is an important section to absorb, because if you understand what Git is and the fundamentals of how it works, then using Git effectively will probably be much easier for you.
91
91
As you learn Git, try to clear your mind of the things you may know about other VCSs, such as Subversion and Perforce; doing so will help you avoid subtle confusion when using the tool.
92
-
Git stores and thinks about information much differently than these other systems, even though the user interface is fairly similar, and understanding those differences will help prevent you from becoming confused while using it.
92
+
Git stores and thinks about information much differently than these other systems, even though the user interface is fairly similar, and understanding those differences will help prevent you from becoming confused while using it.(((Subversion)))(((Perforce)))
93
93
94
94
==== Snapshots, Not Differences
95
95
@@ -138,7 +138,7 @@ This means it’s impossible to change the contents of any file or directory wit
138
138
This functionality is built into Git at the lowest levels and is integral to its philosophy.
139
139
You can’t lose information in transit or get file corruption without Git being able to detect it.
140
140
141
-
The mechanism that Git uses for this checksumming is called a SHA-1 hash.
141
+
The mechanism that Git uses for this checksumming is called a SHA-1 hash.(((SHA-1)))
142
142
This is a 40-character string composed of hexadecimal characters (0–9 and a–f) and calculated based on the contents of a file or directory structure in Git.
143
143
A SHA-1 hash looks something like this:
144
144
@@ -208,7 +208,7 @@ Before you start using Git, you have to make it available on your computer.
208
208
Even if it's already installed, it's probably a good idea to update to the latest version.
209
209
You can either install it as a package or via another installer, or download the source code and compile it yourself.
210
210
211
-
==== Installing on Linux
211
+
==== Installing on Linux(((Linux, installing)))
212
212
213
213
If you want to install Git on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
214
214
If you’re on Fedora, you can use yum:
@@ -221,10 +221,10 @@ Or if you’re on a Debian-based distribution like Ubuntu, try apt-get:
221
221
222
222
For more options, there are instructions for installing on several different Unix flavors on the Git website, at http://git-scm.com/download/linux[].
223
223
224
-
==== Installing on Mac
224
+
==== Installing on Mac(((Mac, installing)))
225
225
226
226
There are several ways to install Git on a Mac.
227
-
The easiest is probably to install the Xcode Command Line Tools.
227
+
The easiest is probably to install the Xcode Command Line Tools.(((Xcode)))
228
228
On Mavericks (10.9) or above you can do this simply by trying to run 'git' from the Terminal the very first time.
229
229
If you don't have it installed already, it will prompt you to install it.
230
230
@@ -240,7 +240,7 @@ You can download that tool from the GitHub for Mac website, at http://mac.github
240
240
241
241
==== Installing on Windows
242
242
243
-
There are also a few ways to install Git on Windows.
243
+
There are also a few ways to install Git on Windows.(((Windows, installing)))
244
244
The most official build is available for download on the Git website.
245
245
Just go to http://git-scm.com/download/win[] and the download will start automatically.
246
246
Note that this is a project called Git for Windows (also called msysGit), which is separate from Git itself; for more information on it, go to http://msysgit.github.io/[].
@@ -257,7 +257,7 @@ Now that you have Git on your system, you’ll want to do a few things to custom
257
257
You should have to do these things only once on any given computer; they’ll stick around between upgrades.
258
258
You can also change them at any time by running through the commands again.
259
259
260
-
Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates.
260
+
Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates.(((git, config)))
261
261
These variables can be stored in three different places:
262
262
263
263
1. `/etc/gitconfig` file: Contains values for every user on the system and all their repositories.
@@ -339,7 +339,7 @@ If you want to check your settings, you can use the `git config --list` command
339
339
You may see keys more than once, because Git reads the same key from different files (`/etc/gitconfig` and `~/.gitconfig`, for example).
340
340
In this case, Git uses the last value for each unique key it sees.
341
341
342
-
You can also check what Git thinks a specific key’s value is by typing `git config <key>`:
342
+
You can also check what Git thinks a specific key’s value is by typing `git config <key>`:(((git, config)))
343
343
344
344
$ git config user.name
345
345
John Doe
@@ -352,13 +352,13 @@ If you ever need help while using Git, there are three ways to get the manual pa
352
352
$ git <verb> --help
353
353
$ man git-<verb>
354
354
355
-
For example, you can get the manpage help for the config command by running
355
+
For example, you can get the manpage help for the config command by running(((git, help)))
356
356
357
357
$ git help config
358
358
359
359
These commands are nice because you can access them anywhere, even offline.
360
360
If the manpages and this book aren’t enough and you need in-person help, you can try the `#git` or `#github` channel on the Freenode IRC server (irc.freenode.net).
361
-
These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help.
361
+
These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help.(((IRC)))
0 commit comments