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/02-git-basics/sections/recording-changes.asc
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,14 +214,25 @@ You can also use two asterisks to match nested directories; `a/**/z` would match
214
214
215
215
Here is another example .gitignore file:
216
216
217
-
[source,console]
217
+
[source]
218
218
----
219
-
# a comment - this is ignored
220
-
*.a # no .a files
221
-
!lib.a # but do track lib.a, even though you're ignoring .a files above
222
-
/TODO # only ignore the root TODO file, not subdir/TODO
223
-
build/ # ignore all files in the build/ directory
224
-
doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt
219
+
# no .a files
220
+
*.a
221
+
222
+
# but do track lib.a, even though you're ignoring .a files above
223
+
!lib.a
224
+
225
+
# only ignore the root TODO file, not subdir/TODO
226
+
/TODO
227
+
228
+
# ignore all files in the build/ directory
229
+
build/
230
+
231
+
# ignore doc/notes.txt, but not doc/server/arch.txt
232
+
doc/*.txt
233
+
234
+
# ignore all .txt files in the doc/ directory
235
+
doc/**/*.txt
225
236
----
226
237
227
238
[TIP]
@@ -493,7 +504,7 @@ This is a safety feature to prevent accidental removal of data that hasn't yet b
493
504
494
505
Another useful thing you may want to do is to keep the file in your working tree but remove it from your staging area.
495
506
In other words, you may want to keep the file on your hard drive but not have Git track it anymore.
496
-
This is particularly useful if you forgot to add something to your `.gitignore` file and accidentally added it, like a large log file or a bunch of `.a` compiled files.
507
+
This is particularly useful if you forgot to add something to your `.gitignore` file and accidentally staged it, like a large log file or a bunch of `.a` compiled files.
Copy file name to clipboardExpand all lines: book/03-git-branching/sections/remote-branches.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
@@ -45,7 +45,7 @@ Name this remote `teamone`, which will be your shortname for that whole URL.
45
45
image::images/remote-branches-4.png[Adding another server as a remote.]
46
46
47
47
Now, you can run `git fetch teamone` to fetch everything the remote `teamone` server has that you don't have yet.
48
-
Because that server is a subset of the data your `origin` server has right now, Git fetches no data but sets a remote branch called `teamone/master` to point to the commit that `teamone` has as its `master` branch.
48
+
Because that server has a subset of the data your `origin` server has right now, Git fetches no data but sets a remote branch called `teamone/master` to point to the commit that `teamone` has as its `master` branch.
49
49
50
50
.Remote tracking branch for `teamone/master`
51
51
image::images/remote-branches-5.png[Remote tracking branch for `teamone/master`.]
Copy file name to clipboardExpand all lines: book/10-git-internals/sections/objects.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
@@ -149,7 +149,7 @@ image::images/data-model-1.png[Simple version of the Git data model.]
149
149
You can fairly easily create your own tree.
150
150
Git normally creates a tree by taking the state of your staging area or index and writing a series of tree objects from it.
151
151
So, to create a tree object, you first have to set up an index by staging some files.
152
-
To create an index with a single entry – the first version of your text.txt file – you can use the plumbing command `update-index`.
152
+
To create an index with a single entry – the first version of your test.txt file – you can use the plumbing command `update-index`.
153
153
You use this command to artificially add the earlier version of the test.txt file to a new staging area.
154
154
You must pass it the `--add` option because the file doesn't yet exist in your staging area (you don't even have a staging area set up yet) and `--cacheinfo` because the file you're adding isn't in your directory but is in your database.
0 commit comments