Skip to content

Commit 4f55250

Browse files
committed
Fix commit message examples to use imperative mood
1 parent bb895a8 commit 4f55250

32 files changed

+306
-306
lines changed

book/02-git-basics/sections/aliases.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ commit 66938dae3329c7aebe598c2246a8e6af90d04646
5353
Author: Josh Goebel <[email protected]>
5454
Date: Tue Aug 26 19:48:51 2008 +0800
5555
56-
test for current head
56+
Test for current head
5757
5858
Signed-off-by: Scott Chacon <[email protected]>
5959
----

book/02-git-basics/sections/getting-a-repository.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can accomplish that with a few `git add` commands that specify the files you
4747
----
4848
$ git add *.c
4949
$ git add LICENSE
50-
$ git commit -m 'initial project version'
50+
$ git commit -m 'Initial project version'
5151
----
5252

5353
We'll go over what these commands do in just a minute.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ Alternatively, you can type your commit message inline with the `commit` command
461461

462462
[source,console]
463463
----
464-
$ git commit -m "Story 182: Fix benchmarks for speed"
465-
[master 463dc4f] Story 182: Fix benchmarks for speed
464+
$ git commit -m "Story 182: fix benchmarks for speed"
465+
[master 463dc4f] Story 182: fix benchmarks for speed
466466
2 files changed, 2 insertions(+)
467467
create mode 100644 README
468468
----
@@ -493,8 +493,8 @@ Changes not staged for commit:
493493
modified: CONTRIBUTING.md
494494
495495
no changes added to commit (use "git add" and/or "git commit -a")
496-
$ git commit -a -m 'added new benchmarks'
497-
[master 83e38c7] added new benchmarks
496+
$ git commit -a -m 'Add new benchmarks'
497+
[master 83e38c7] Add new benchmarks
498498
1 file changed, 5 insertions(+), 0 deletions(-)
499499
----
500500

book/02-git-basics/sections/tagging.asc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
9191
Author: Scott Chacon <[email protected]>
9292
Date: Mon Mar 17 21:52:11 2008 -0700
9393
94-
changed the version number
94+
Change version number
9595
----
9696

9797
That shows the tagger information, the date the commit was tagged, and the annotation message before showing the commit information.
@@ -124,7 +124,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
124124
Author: Scott Chacon <[email protected]>
125125
Date: Mon Mar 17 21:52:11 2008 -0700
126126
127-
changed the version number
127+
Change version number
128128
----
129129

130130
==== Tagging Later
@@ -136,18 +136,18 @@ Suppose your commit history looks like this:
136136
----
137137
$ git log --pretty=oneline
138138
15027957951b64cf874c3557a0f3547bd83b3ff6 Merge branch 'experiment'
139-
a6b4c97498bd301d84096da251c98a07c7723e65 beginning write support
140-
0d52aaab4479697da7686c15f77a3d64d9165190 one more thing
139+
a6b4c97498bd301d84096da251c98a07c7723e65 Create write support
140+
0d52aaab4479697da7686c15f77a3d64d9165190 One more thing
141141
6d52a271eda8725415634dd79daabbc4d9b6008e Merge branch 'experiment'
142-
0b7434d86859cc7b8c3d5e1dddfed66ff742fcbc added a commit function
143-
4682c3261057305bdd616e23b64b0857d832627b added a todo file
144-
166ae0c4d3f420721acbb115cc33848dfcc2121a started write support
145-
9fceb02d0ae598e95dc970b74767f19372d61af8 updated rakefile
146-
964f16d36dfccde844893cac5b347e7b3d44abbc commit the todo
147-
8a5cbc430f1a9c3d00faaeffd07798508422908a updated readme
142+
0b7434d86859cc7b8c3d5e1dddfed66ff742fcbc Add commit function
143+
4682c3261057305bdd616e23b64b0857d832627b Add todo file
144+
166ae0c4d3f420721acbb115cc33848dfcc2121a Create write support
145+
9fceb02d0ae598e95dc970b74767f19372d61af8 Update rakefile
146+
964f16d36dfccde844893cac5b347e7b3d44abbc Commit the todo
147+
8a5cbc430f1a9c3d00faaeffd07798508422908a Update readme
148148
----
149149

150-
Now, suppose you forgot to tag the project at v1.2, which was at the ``updated rakefile'' commit.
150+
Now, suppose you forgot to tag the project at v1.2, which was at the ``Update rakefile'' commit.
151151
You can add it after the fact.
152152
To tag that commit, you specify the commit checksum (or part of it) at the end of the command:
153153

@@ -178,7 +178,7 @@ commit 9fceb02d0ae598e95dc970b74767f19372d61af8
178178
Author: Magnus Chacon <[email protected]>
179179
Date: Sun Apr 27 20:43:35 2008 -0700
180180
181-
updated rakefile
181+
Update rakefile
182182
...
183183
----
184184

@@ -277,7 +277,7 @@ HEAD is now at 99ada87... Merge pull request #89 from schacon/appendix-final
277277
278278
$ git checkout 2.0-beta-0.1
279279
Previous HEAD position was 99ada87... Merge pull request #89 from schacon/appendix-final
280-
HEAD is now at df3f601... add atlas.json and cover image
280+
HEAD is now at df3f601... Add atlas.json and cover image
281281
----
282282

283283
In ``detached HEAD'' state, if you make changes and then create a commit, the tag will stay the same, but your new commit won't belong to any branch and will be unreachable, except by the exact commit hash.

book/02-git-basics/sections/undoing.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ As an example, if you commit and then realize you forgot to stage the changes in
2424

2525
[source,console]
2626
----
27-
$ git commit -m 'initial commit'
27+
$ git commit -m 'Initial commit'
2828
$ git add forgotten_file
2929
$ git commit --amend
3030
----

book/02-git-basics/sections/viewing-history.asc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ commit ca82a6dff817ec66f44342007202690a93763949
2121
Author: Scott Chacon <[email protected]>
2222
Date: Mon Mar 17 21:52:11 2008 -0700
2323
24-
changed the version number
24+
Change version number
2525
2626
commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
2727
Author: Scott Chacon <[email protected]>
2828
Date: Sat Mar 15 16:40:33 2008 -0700
2929
30-
removed unnecessary test
30+
Remove unnecessary test
3131
3232
commit a11bef06a3f659402fe7563abf99ad00de2209e6
3333
Author: Scott Chacon <[email protected]>
3434
Date: Sat Mar 15 10:31:28 2008 -0700
3535
36-
first commit
36+
Initial commit
3737
----
3838

3939
By default, with no arguments, `git log` lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.
@@ -52,7 +52,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
5252
Author: Scott Chacon <[email protected]>
5353
Date: Mon Mar 17 21:52:11 2008 -0700
5454
55-
changed the version number
55+
Change version number
5656
5757
diff --git a/Rakefile b/Rakefile
5858
index a874b73..8f94139 100644
@@ -72,7 +72,7 @@ commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
7272
Author: Scott Chacon <[email protected]>
7373
Date: Sat Mar 15 16:40:33 2008 -0700
7474
75-
removed unnecessary test
75+
Remove unnecessary test
7676
7777
diff --git a/lib/simplegit.rb b/lib/simplegit.rb
7878
index a0a60ae..47c6340 100644
@@ -101,7 +101,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
101101
Author: Scott Chacon <[email protected]>
102102
Date: Mon Mar 17 21:52:11 2008 -0700
103103
104-
changed the version number
104+
Change version number
105105
106106
Rakefile | 2 +-
107107
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -110,7 +110,7 @@ commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
110110
Author: Scott Chacon <[email protected]>
111111
Date: Sat Mar 15 16:40:33 2008 -0700
112112
113-
removed unnecessary test
113+
Remove unnecessary test
114114
115115
lib/simplegit.rb | 5 -----
116116
1 file changed, 5 deletions(-)
@@ -119,7 +119,7 @@ commit a11bef06a3f659402fe7563abf99ad00de2209e6
119119
Author: Scott Chacon <[email protected]>
120120
Date: Sat Mar 15 10:31:28 2008 -0700
121121
122-
first commit
122+
Initial commit
123123
124124
README | 6 ++++++
125125
Rakefile | 23 +++++++++++++++++++++++
@@ -139,9 +139,9 @@ In addition, the `short`, `full`, and `fuller` options show the output in roughl
139139
[source,console]
140140
----
141141
$ git log --pretty=oneline
142-
ca82a6dff817ec66f44342007202690a93763949 changed the version number
143-
085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 removed unnecessary test
144-
a11bef06a3f659402fe7563abf99ad00de2209e6 first commit
142+
ca82a6dff817ec66f44342007202690a93763949 Change version number
143+
085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 Remove unnecessary test
144+
a11bef06a3f659402fe7563abf99ad00de2209e6 Initial commit
145145
----
146146

147147
The most interesting option is `format`, which allows you to specify your own log output format.
@@ -150,9 +150,9 @@ This is especially useful when you're generating output for machine parsing -- b
150150
[source,console]
151151
----
152152
$ git log --pretty=format:"%h - %an, %ar : %s"
153-
ca82a6d - Scott Chacon, 6 years ago : changed the version number
154-
085bb3b - Scott Chacon, 6 years ago : removed unnecessary test
155-
a11bef0 - Scott Chacon, 6 years ago : first commit
153+
ca82a6d - Scott Chacon, 6 years ago : Change version number
154+
085bb3b - Scott Chacon, 6 years ago : Remove unnecessary test
155+
a11bef0 - Scott Chacon, 6 years ago : Initial commit
156156
----
157157

158158
<<pretty_format>> lists some of the more useful options that `format` takes.
@@ -190,15 +190,15 @@ This option adds a nice little ASCII graph showing your branch and merge history
190190
[source,console]
191191
----
192192
$ git log --pretty=format:"%h %s" --graph
193-
* 2d3acf9 ignore errors from SIGCHLD on trap
193+
* 2d3acf9 Ignore errors from SIGCHLD on trap
194194
* 5e3ee11 Merge branch 'master' of git://github.com/dustin/grit
195195
|\
196-
| * 420eac9 Added a method for getting the current branch.
197-
* | 30e367c timeout code and tests
198-
* | 5a09431 add timeout protection to grit
199-
* | e1193f8 support for heads with slashes in them
196+
| * 420eac9 Add method for getting the current branch
197+
* | 30e367c Timeout code and tests
198+
* | 5a09431 Add timeout protection to grit
199+
* | e1193f8 Support for heads with slashes in them
200200
|/
201-
* d6016bc require time for xmlschema
201+
* d6016bc Require time for xmlschema
202202
* 11d191e Merge branch 'defunkt' into local
203203
----
204204

book/03-git-branching/sections/basic-branching-and-merging.asc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Doing so moves the `iss53` branch forward, because you have it checked out (that
5050
[source,console]
5151
----
5252
$ vim index.html
53-
$ git commit -a -m 'added a new footer [issue 53]'
53+
$ git commit -a -m 'Create new footer [issue 53]'
5454
----
5555

5656
.The `iss53` branch has moved forward with your work
@@ -83,8 +83,8 @@ Let's create a `hotfix` branch on which to work until it's completed:
8383
$ git checkout -b hotfix
8484
Switched to a new branch 'hotfix'
8585
$ vim index.html
86-
$ git commit -a -m 'fixed the broken email address'
87-
[hotfix 1fb7853] fixed the broken email address
86+
$ git commit -a -m 'Fix broken email address'
87+
[hotfix 1fb7853] Fix broken email address
8888
1 file changed, 2 insertions(+)
8989
----
9090

@@ -130,8 +130,8 @@ Now you can switch back to your work-in-progress branch on issue #53 and continu
130130
$ git checkout iss53
131131
Switched to branch "iss53"
132132
$ vim index.html
133-
$ git commit -a -m 'finished the new footer [issue 53]'
134-
[iss53 ad82d7a] finished the new footer [issue 53]
133+
$ git commit -a -m 'Finish the new footer [issue 53]'
134+
[iss53 ad82d7a] Finish the new footer [issue 53]
135135
1 file changed, 1 insertion(+)
136136
----
137137

book/03-git-branching/sections/branch-management.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ To see the last commit on each branch, you can run `git branch -v`:
2222
[source,console]
2323
----
2424
$ git branch -v
25-
iss53 93b412c fix javascript issue
25+
iss53 93b412c Fix javascript issue
2626
* master 7a98805 Merge branch 'iss53'
27-
testing 782fd34 add scott to the author list in the readmes
27+
testing 782fd34 Add scott to the author list in the readme
2828
----
2929

3030
The useful `--merged` and `--no-merged` options can filter this list to branches that you have or have not yet merged into the branch you're currently on.

book/03-git-branching/sections/nutshell.asc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Staging the files computes a checksum for each one (the SHA-1 hash we mentioned
1414
[source,console]
1515
----
1616
$ git add README test.rb LICENSE
17-
$ git commit -m 'The initial commit of my project'
17+
$ git commit -m 'Initial commit'
1818
----
1919

2020
When you create the commit by running `git commit`, Git checksums each subdirectory (in this case, just the root project directory) and stores them as a tree object in the Git repository.
@@ -80,9 +80,9 @@ This option is called `--decorate`.
8080
[source,console]
8181
----
8282
$ git log --oneline --decorate
83-
f30ab (HEAD -> master, testing) add feature #32 - ability to add new formats to the central interface
84-
34ac2 Fixed bug #1328 - stack overflow under certain conditions
85-
98ca9 The initial commit of my project
83+
f30ab (HEAD -> master, testing) Add feature #32 - ability to add new formats to the central interface
84+
34ac2 Fix bug #1328 - stack overflow under certain conditions
85+
98ca9 Initial commit
8686
----
8787

8888
You can see the `master` and `testing` branches that are right there next to the `f30ab` commit.
@@ -175,11 +175,11 @@ If you run `git log --oneline --decorate --graph --all` it will print out the hi
175175
[source,console]
176176
----
177177
$ git log --oneline --decorate --graph --all
178-
* c2b9e (HEAD, master) made other changes
179-
| * 87ab2 (testing) made a change
178+
* c2b9e (HEAD, master) Made other changes
179+
| * 87ab2 (testing) Made a change
180180
|/
181-
* f30ab add feature #32 - ability to add new formats to the
182-
* 34ac2 fixed bug #1328 - stack overflow under certain conditions
181+
* f30ab Add feature #32 - ability to add new formats to the central interface
182+
* 34ac2 Fix bug #1328 - stack overflow under certain conditions
183183
* 98ca9 initial commit of my project
184184
----
185185

book/03-git-branching/sections/remote-branches.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ This will list out your local branches with more information including what each
188188
[source,console]
189189
----
190190
$ git branch -vv
191-
iss53 7e424c3 [origin/iss53: ahead 2] forgot the brackets
192-
master 1ae2a45 [origin/master] deploying index fix
193-
* serverfix f8674d9 [teamone/server-fix-good: ahead 3, behind 1] this should do it
194-
testing 5ea463a trying something new
191+
iss53 7e424c3 [origin/iss53: ahead 2] Add forgotten brackets
192+
master 1ae2a45 [origin/master] Deploy index fix
193+
* serverfix f8674d9 [teamone/server-fix-good: ahead 3, behind 1] This should do it
194+
testing 5ea463a Try something new
195195
----
196196

197197
So here we can see that our `iss53` branch is tracking `origin/iss53` and is ``ahead'' by two, meaning that we have two commits locally that are not pushed to the server.

0 commit comments

Comments
 (0)