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/first-time-setup.asc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,12 @@ These variables can be stored in three different places:
10
10
11
11
1. `/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
12
12
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
13
-
(Because this is a system configuration file, you would need administrative or superuser privilege to make changes to it.)
13
+
Because this is a system configuration file, you would need administrative or superuser privilege to make changes to it.
14
14
2. `~/.gitconfig` or `~/.config/git/config` file: Values specific personally to you, the user.
15
15
You can make Git read and write to this file specifically by passing the `--global` option, and this affects _all_ of the repositories you work with on your system.
16
16
3. `config` file in the Git directory (that is, `.git/config`) of whatever repository you're currently using: Specific to that single repository.
17
17
You can force Git to read from and write to this file with the `--local` option, but that is in fact the default.
18
-
(Unsurprisingly, you need to be located somewhere in a Git repository for this option to work properly.)
18
+
Unsurprisingly, you need to be located somewhere in a Git repository for this option to work properly.
19
19
20
20
Each level overrides values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`.
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/getting-a-repository.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ $ git init
38
38
39
39
This creates a new subdirectory named `.git` that contains all of your necessary repository files -- a Git repository skeleton.
40
40
At this point, nothing in your project is tracked yet.
41
-
(See <<ch10-git-internals#ch10-git-internals>> for more information about exactly what files are contained in the `.git` directory you just created.)(((git commands, init)))
41
+
See <<ch10-git-internals#ch10-git-internals>> for more information about exactly what files are contained in the `.git` directory you just created.(((git commands, init)))
42
42
43
43
If you want to start version-controlling existing files (as opposed to an empty directory), you should probably begin tracking those files and do an initial commit.
44
44
You can accomplish that with a few `git add` commands that specify the files you want to track, followed by a `git commit`:
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/remotes.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ From https://github.com/paulboone/ticgit
103
103
----
104
104
105
105
Paul's `master` branch is now accessible locally as `pb/master` -- you can merge it into one of your branches, or you can check out a local branch at that point if you want to inspect it.
106
-
(We'll go over what branches are and how to use them in much more detail in <<ch03-git-branching#ch03-git-branching>>.)
106
+
We'll go over what branches are and how to use them in much more detail in <<ch03-git-branching#ch03-git-branching>>.
Copy file name to clipboardExpand all lines: book/05-distributed-git/sections/contributing.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ In this environment, you can follow a workflow similar to what you might do when
110
110
You still get the advantages of things like offline committing and vastly simpler branching and merging, but the workflow can be very similar; the main difference is that merges happen client-side rather than on the server at commit time.
111
111
Let's see what it might look like when two developers start to work together with a shared repository.
112
112
The first developer, John, clones the repository, makes a change, and commits locally.
113
-
(The protocol messages have been replaced with `...` in these examples to shorten them somewhat.)
113
+
The protocol messages have been replaced with `...` in these examples to shorten them somewhat.
Copy file name to clipboardExpand all lines: book/06-github/sections/1-setting-up-account.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ As of right now, you're fully able to connect with Git repositories using the `h
29
29
However, to simply clone public projects, you don't even need to sign up - the account we just created comes into play when we fork projects and push to our forks a bit later.
30
30
31
31
If you'd like to use SSH remotes, you'll need to configure a public key.
32
-
(If you don't already have one, see <<ch04-git-on-the-server#_generate_ssh_key>>.)
32
+
If you don't already have one, see <<ch04-git-on-the-server#_generate_ssh_key>>.
33
33
Open up your account settings using the link at the top-right of the window:
Copy file name to clipboardExpand all lines: book/07-git-tools/sections/reset.asc
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ For this, we recommend a simple metaphor.
10
10
11
11
An easier way to think about `reset` and `checkout` is through the mental frame of Git being a content manager of three different trees.
12
12
By ``tree'' here, we really mean ``collection of files'', not specifically the data structure.
13
-
(There are a few cases where the index doesn't exactly act like a tree, but for our purposes it is easier to think about it this way for now.)
13
+
There are a few cases where the index doesn't exactly act like a tree, but for our purposes it is easier to think about it this way for now.
14
14
15
15
Git as a system manages and manipulates three trees in its normal operation:
16
16
@@ -220,8 +220,7 @@ If we look at the diagram for that command and think about what `git add` does,
220
220
221
221
image::images/reset-path2.png[]
222
222
223
-
This is why the output of the `git status` command suggests that you run this to unstage a file.
224
-
(See <<ch02-git-basics-chapter#_unstaging>> for more on this.)
223
+
This is why the output of the `git status` command suggests that you run this to unstage a file (see <<ch02-git-basics-chapter#_unstaging>> for more on this).
225
224
226
225
We could just as easily not let Git assume we meant ``pull the data from HEAD'' by specifying a specific commit to pull that file version from.
227
226
We would just run something like `git reset eb43bf file.txt`.
@@ -240,7 +239,7 @@ Let's look at how to do something interesting with this newfound power -- squash
240
239
241
240
Say you have a series of commits with messages like ``oops.'', ``WIP'' and ``forgot this file''.
242
241
You can use `reset` to quickly and easily squash them into a single commit that makes you look really smart.
243
-
(<<_squashing>> shows another way to do this, but in this example it's simpler to use `reset`.)
242
+
<<_squashing>> shows another way to do this, but in this example it's simpler to use `reset`.
244
243
245
244
Let's say you have a project where the first commit has one file, the second commit added a new file and changed the first, and the third commit changed the first file again.
246
245
The second commit was a work in progress and you want to squash it down.
Copy file name to clipboardExpand all lines: book/07-git-tools/sections/submodules.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -973,7 +973,7 @@ Indeed, if you switch between branches that record the submodule at different co
973
973
That is because the submodule state is by default not carried over when switching branches.
974
974
975
975
This can be really confusing, so it's a good idea to always `git checkout --recurse-submodules` when your project has submodules.
976
-
(For older Git versions that do not have the `--recurse-submodules` flag, after the checkout you can use `git submodule update --init --recursive` to put the submodules in the right state.)
976
+
For older Git versions that do not have the `--recurse-submodules` flag, after the checkout you can use `git submodule update --init --recursive` to put the submodules in the right state.
977
977
978
978
Luckily, you can tell Git (>=2.14) to always use the `--recurse-submodules` flag by setting the configuration option `submodule.recurse`: `git config submodule.recurse true`.
979
979
As noted above, this will also make Git recurse into submodules for every command that has a `--recurse-submodules` option (except `git clone`).
Copy file name to clipboardExpand all lines: book/08-customizing-git/sections/config.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ You can make Git read and write to this file by passing the `--global` option.
22
22
23
23
Finally, Git looks for configuration values in the configuration file in the Git directory (`.git/config`) of whatever repository you're currently using.
24
24
These values are specific to that single repository, and represent passing the `--local` option to `git config`.
25
-
(If you don't specify which level you want to work with, this is the default.)
25
+
If you don't specify which level you want to work with, this is the default.
26
26
27
27
Each of these ``levels'' (system, global, local) overwrites values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`, for instance.
0 commit comments