Skip to content

Commit 1d4253b

Browse files
committed
Merge pull request progit#329 from noisy/newline_should_separate_sentences
New line should separate sentences (02-git-basics/sections/recording-changes.asc)
2 parents 3426101 + ca0b586 commit 1d4253b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

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

+16-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ Changes not staged for commit:
106106
----
107107

108108
The ``CONTRIBUTING.md'' file appears under a section named ``Changed but not staged for commit'' – which means that a file that is tracked has been modified in the working directory but not yet staged.
109-
To stage it, you run the `git add` command. `git add` is a multipurpose command – you use it to begin tracking new files, to stage files, and to do other things like marking merge-conflicted files as resolved. It may be helpful to think of it more as ``add this content to the next commit'' rather than ``add this file to the project''.(((git commands, add)))
109+
To stage it, you run the `git add` command.
110+
`git add` is a multipurpose command – you use it to begin tracking new files, to stage files, and to do other things like marking merge-conflicted files as resolved.
111+
It may be helpful to think of it more as ``add this content to the next commit'' rather than ``add this file to the project''.(((git commands, add)))
110112
Let's run `git add` now to stage the ``CONTRIBUTING.md'' file, and then run `git status` again:
111113

112114
[source,console]
@@ -167,7 +169,9 @@ Changes to be committed:
167169

168170
==== Short Status
169171

170-
While the `git status` output is pretty comprehensive, it's also quite wordy. Git also has a short status flag so you can see your changes in a more compact way. If you run `git status -s` or `git status --short` you get a far more simplified output from the command.
172+
While the `git status` output is pretty comprehensive, it's also quite wordy.
173+
Git also has a short status flag so you can see your changes in a more compact way.
174+
If you run `git status -s` or `git status --short` you get a far more simplified output from the command.
171175

172176
[source,console]
173177
----
@@ -179,7 +183,10 @@ M lib/simplegit.rb
179183
?? LICENSE.txt
180184
----
181185

182-
New files that aren't tracked have a `??` next to them, new files that have been added to the staging area have an `A`, modified files have an `M` and so on. There are two columns to the output - the left hand column indicates that the file is staged and the right hand column indicates that it's modified. So for example in that output, the `README` file is modified in the working directory but not yet staged, while the `lib/simplegit.rb` file is modified and staged. The `Rakefile` was modified, staged and then modified again, so there are changes to it that are both staged and unstaged.
186+
New files that aren't tracked have a `??` next to them, new files that have been added to the staging area have an `A`, modified files have an `M` and so on.
187+
There are two columns to the output - the left hand column indicates that the file is staged and the right hand column indicates that it's modified.
188+
So for example in that output, the `README` file is modified in the working directory but not yet staged, while the `lib/simplegit.rb` file is modified and staged.
189+
The `Rakefile` was modified, staged and then modified again, so there are changes to it that are both staged and unstaged.
183190

184191
[[_ignoring]]
185192
==== Ignoring Files
@@ -310,7 +317,8 @@ index 0000000..03902a1
310317
It's important to note that `git diff` by itself doesn't show all changes made since your last commit – only changes that are still unstaged.
311318
This can be confusing, because if you've staged all of your changes, `git diff` will give you no output.
312319

313-
For another example, if you stage the `CONTRIBUTING.md` file and then edit it, you can use `git diff` to see the changes in the file that are staged and the changes that are unstaged. If our environment looks like this:
320+
For another example, if you stage the `CONTRIBUTING.md` file and then edit it, you can use `git diff` to see the changes in the file that are staged and the changes that are unstaged.
321+
If our environment looks like this:
314322

315323
[source,console]
316324
----
@@ -370,7 +378,10 @@ index 8ebb991..643e24f 100644
370378
[NOTE]
371379
.Git Diff in an External Tool
372380
====
373-
We will continue to use the `git diff` command in various ways throughout the rest of the book. There is another way to look at these diffs if you prefer a graphical or external diff viewing program instead. If you run `git difftool` instead of `git diff`, you can view any of these diffs in software like Araxis, emerge, vimdiff and more. Run `git difftool --tool-help` to see what is available on your system.
381+
We will continue to use the `git diff` command in various ways throughout the rest of the book.
382+
There is another way to look at these diffs if you prefer a graphical or external diff viewing program instead.
383+
If you run `git difftool` instead of `git diff`, you can view any of these diffs in software like Araxis, emerge, vimdiff and more.
384+
Run `git difftool --tool-help` to see what is available on your system.
374385
====
375386

376387
[[_committing_changes]]

0 commit comments

Comments
 (0)