Skip to content

Commit bed6bd5

Browse files
committed
Wording/grammar/clarification tweaks to "Recording Changes" section
No major changes, just some rewording and clarification where I thought it was useful.
1 parent e91bc7e commit bed6bd5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

book/02-git-basics/sections/recording-changes.asc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
=== Recording Changes to the Repository
22

3-
You have a bona fide Git repository and a checkout or working copy of the files for that project.
4-
You need to make some changes and commit snapshots of those changes into your repository each time the project reaches a state you want to record.
3+
At this point, you should have a _bona fide_ Git repository on your local machine, and a checkout or _working copy_ of all of its files in front of you.
4+
Typically, you'll want to start making changes and committing snapshots of those changes into your repository each time the project reaches a state you want to record.
5+
6+
Remember that each file in your working directory can be in one of two states: _tracked_ or _untracked_.
7+
Tracked files are files that were in the last snapshot; they can be unmodified, modified, or staged; in short, tracked files are files that Git knows about.
58

6-
Remember that each file in your working directory can be in one of two states: tracked or untracked.
7-
Tracked files are files that were in the last snapshot; they can be unmodified, modified, or staged.
89
Untracked files are everything else – any files in your working directory that were not in your last snapshot and are not in your staging area.
910
When you first clone a repository, all of your files will be tracked and unmodified because Git just checked them out and you haven't edited anything.
1011

1112
As you edit files, Git sees them as modified, because you've changed them since your last commit.
12-
You stage these modified files and then commit all your staged changes, and the cycle repeats.
13+
As you work, you selectively stage these modified files and then commit all those staged changes, and the cycle repeats.
1314

1415
.The lifecycle of the status of your files.
1516
image::images/lifecycle.png[The lifecycle of the status of your files.]
@@ -213,12 +214,12 @@ $ cat .gitignore
213214
The first line tells Git to ignore any files ending in ``.o'' or ``.a'' – object and archive files that may be the product of building your code.
214215
The second line tells Git to ignore all files whose names end with a tilde (`~`), which is used by many text editors such as Emacs to mark temporary files.
215216
You may also include a log, tmp, or pid directory; automatically generated documentation; and so on.
216-
Setting up a `.gitignore` file before you get going is generally a good idea so you don't accidentally commit files that you really don't want in your Git repository.
217+
Setting up a `.gitignore` file for your new repository before you get going is generally a good idea so you don't accidentally commit files that you really don't want in your Git repository.
217218

218219
The rules for the patterns you can put in the `.gitignore` file are as follows:
219220

220221
* Blank lines or lines starting with `#` are ignored.
221-
* Standard glob patterns work.
222+
* Standard glob patterns work, and will be applied recursively throughout the entire working tree.
222223
* You can start patterns with a forward slash (`/`) to avoid recursivity.
223224
* You can end patterns with a forward slash (`/`) to specify a directory.
224225
* You can negate a pattern by starting it with an exclamation point (`!`).
@@ -231,7 +232,7 @@ Here is another example `.gitignore` file:
231232

232233
[source]
233234
----
234-
# no .a files
235+
# ignore all .a files
235236
*.a
236237
237238
# but do track lib.a, even though you're ignoring .a files above

0 commit comments

Comments
 (0)