Skip to content

Commit 16d1445

Browse files
Update some documentation that was out of sync (#1164)
* make instructions easier to copy-paste * update some documentation that was out of sync
1 parent 4d2d393 commit 16d1445

7 files changed

+83
-220
lines changed

check_integrity.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ err() {
66
}
77

88
make_doc() {
9-
echo "'touch man/git-$1.md && make man/git-$1.{1,html}'"
9+
echo "touch man/git-$1.md && make man/git-$1.{1,html}"
1010
}
1111

1212
check_bash_script() {
@@ -49,7 +49,7 @@ check_documentation() {
4949

5050
if [ "man/$cmd.md" -nt "man/$cmd.1" ] || [ "man/$cmd.md" -nt "man/$cmd.html" ]
5151
then
52-
err "man/$cmd.md, man/$cmd.1, and man/$cmd.html all exist, but man/$cmd.md is newer. You should rm man/$cmd.1 man/$cmd.html and then create man/$cmd.1 and man/$cmd.html via $(make_doc "$1")"
52+
err "man/$cmd.md, man/$cmd.1, and man/$cmd.html all exist, but man/$cmd.md is newer. You should rm man/$cmd.{1,html} && $(make_doc "$1")"
5353
fi
5454

5555
check_git_extras_cmd_list "$@"

man/git-reauthor.1

+17-94
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,121 @@
1-
.\" generated with Ronn/v0.7.3
2-
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3-
.
4-
.TH "GIT\-REAUTHOR" "1" "October 2017" "" "Git Extras"
5-
.
1+
.\" generated with Ronn-NG/v0.9.1
2+
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
3+
.TH "GIT\-REAUTHOR" "1" "September 2019" "" "Git Extras"
64
.SH "NAME"
7-
\fBgit\-reauthor\fR \- Rewrite history to change author\'s identity
8-
.
5+
\fBgit\-reauthor\fR \- Rewrite history to change author's identity
96
.SH "SYNOPSIS"
107
\fBgit reauthor [<options>]\fR
11-
.
128
.SH "DESCRIPTION"
139
Lets you replace the author and/or committer identities in commits and tags\.
14-
.
1510
.P
1611
The command goes through all existing commits and tags in all local branches to selectively modify the identities present in those objects\. All the other information such as dates, messages,\.\. are preserved\.
17-
.
1812
.P
1913
You can rewrite all the identities in the commits and tags objects by using the \-\-all flag, or only replace the identities whose email matches the value of the \-\-old\-email option\. It is also possible to limit the rewrite to a certain type of identity: the author or the committer identity\. By default, both of them are affected\.
20-
.
2114
.br
2215
For each of those identities to update, the command will replace the name and/or email with the new correct values as defined via the options\. If the new identity name to set is not defined, the current one will be kept (and vice\-versa with the email)\.
23-
.
2416
.P
2517
\fBWARNING!\fR This command rewrites history and as a result you will not able to push your branch to the remote without using the \-\-force option\.
26-
.
2718
.br
2819
See more information with \fBgit help filter\-branch\fR\.
29-
.
3020
.SH "OPTIONS"
3121
\-a, \-\-all
32-
.
3322
.IP "" 4
34-
.
3523
.nf
36-
3724
Rewrite ALL identities in commits and tags\.
38-
.
3925
.fi
40-
.
4126
.IP "" 0
42-
.
4327
.P
4428
\-c, \-\-use\-config
45-
.
4629
.IP "" 4
47-
.
4830
.nf
49-
5031
Define correct values from user Git config
5132
Values of \-\-correct\-email and \-\-correct\-name options take precedence over the ones from the config if specified as well
52-
.
5333
.fi
54-
.
5534
.IP "" 0
56-
.
5735
.P
5836
\-e, \-\-correct\-email <\fIemail\fR>
59-
.
6037
.IP "" 4
61-
.
6238
.nf
63-
6439
Define the correct email to set
65-
Empty email \'\' is allowed
66-
.
40+
Empty email '' is allowed
6741
.fi
68-
.
6942
.IP "" 0
70-
.
7143
.P
7244
\-n, \-\-correct\-name <\fIname\fR>
73-
.
7445
.IP "" 4
75-
.
7646
.nf
77-
7847
Define the correct name to set
79-
Empty name \'\' is not allowed
80-
.
48+
Empty name '' is not allowed
8149
.fi
82-
.
8350
.IP "" 0
84-
.
8551
.P
8652
\-o, \-\-old\-email <\fIemail\fR>
87-
.
8853
.IP "" 4
89-
.
9054
.nf
91-
9255
Rewrite identities matching old email in commits and tags
93-
Empty email \'\' is allowed
94-
.
56+
Empty email '' is allowed
9557
.fi
96-
.
9758
.IP "" 0
98-
.
9959
.P
10060
\-t, \-\-type <\fIid\fR>
101-
.
10261
.IP "" 4
103-
.
10462
.nf
105-
10663
Define the type of identities affected by the rewrite
10764
Possible type identifiers are: author, committer, both (default)
108-
.
10965
.fi
110-
.
11166
.IP "" 0
112-
.
11367
.SH "EXAMPLES"
11468
Replace the personal email and name of Jack to his work ones
115-
.
11669
.IP "" 4
117-
.
11870
.nf
119-
120-
$ git reauthor \-\-old\-email jack@perso\.me \-\-correct\-email jack@work\.com \-\-correct\-name \'Jack Foobar\'
121-
.
71+
$ git reauthor \-\-old\-email jack@perso\.me \-\-correct\-email jack@work\.com \-\-correct\-name 'Jack Foobar'
12272
.fi
123-
.
12473
.IP "" 0
125-
.
12674
.P
12775
Replace the email and name of Jack to the ones defined in the Git config
128-
.
12976
.IP "" 4
130-
.
13177
.nf
132-
13378
$ git reauthor \-\-old\-email jack@perso\.me \-\-use\-config
134-
.
13579
.fi
136-
.
13780
.IP "" 0
138-
.
13981
.P
14082
Replace only the email of Jack (keep the name already used)
141-
.
14283
.IP "" 4
143-
.
14484
.nf
145-
14685
$ git reauthor \-\-old\-email jack@perso \-\-correct\-email jack@perso\.me
147-
.
14886
.fi
149-
.
15087
.IP "" 0
151-
.
15288
.P
15389
Change only the committer email of Jack (keep the author email already used)
154-
.
15590
.IP "" 4
156-
.
15791
.nf
158-
15992
$ git reauthor \-\-old\-email jack@perso\.me \-\-correct\-email jack@work\.com \-\-type committer
160-
.
16193
.fi
162-
.
16394
.IP "" 0
164-
.
16595
.P
166-
Set Jack\'s identity as the only one of the whole repository
167-
.
96+
Change only the name and keep email to merge one user with multiple pseudonyms\.
97+
.IP "" 4
98+
.nf
99+
$ git reauthor \-\-old\-email jack@perso\.me \-\-correct\-name Jack
100+
.fi
101+
.IP "" 0
102+
.P
103+
Set Jack's identity as the only one of the whole repository
168104
.IP "" 4
169-
.
170105
.nf
171-
172106
$ git reauthor \-\-all \-\-correct\-email jack@perso\.me \-\-correct\-name Jack
173-
.
174107
.fi
175-
.
176108
.IP "" 0
177-
.
178109
.P
179110
Set Jack as the only committer of the whole repository (keeps authors)
180-
.
181111
.IP "" 4
182-
.
183112
.nf
184-
185113
$ git reauthor \-\-all \-\-correct\-email jack@perso\.me \-\-correct\-name Jack \-\-type committer
186-
.
187114
.fi
188-
.
189115
.IP "" 0
190-
.
191116
.SH "AUTHOR"
192117
Written by Damien Tardy\-Panis <\fIdamien@tardypad\.me\fR>
193-
.
194118
.SH "REPORTING BUGS"
195-
<\fIhttp://github\.com/tj/git\-extras/issues\fR>
196-
.
119+
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
197120
.SH "SEE ALSO"
198121
<\fIhttps://github\.com/tj/git\-extras\fR>

man/git-reauthor.html

+22-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)