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
Again, you need to do this only once if you pass the `--global` option, because then Git will always use that information for anything you do on that system.
35
-
If you want to override this with a different name or e-mail address for specific projects, you can run the command without the `--global` option when you're in that project.
35
+
If you want to override this with a different name or email address for specific projects, you can run the command without the `--global` option when you're in that project.
36
36
37
37
Many of the GUI tools will help you do this when you first run them.
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/tagging.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
@@ -46,7 +46,7 @@ Git uses two main types of tags: lightweight and annotated.
46
46
A lightweight tag is very much like a branch that doesn't change – it's just a pointer to a specific commit.
47
47
48
48
Annotated tags, however, are stored as full objects in the Git database.
49
-
They're checksummed; contain the tagger name, e-mail, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
49
+
They're checksummed; contain the tagger name, email, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
50
50
It's generally recommended that you create annotated tags so you can have all this information; but if you want a temporary tag or for some reason don't want to keep the other information, lightweight tags are available too.
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/viewing-history.asc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Date: Sat Mar 15 10:31:28 2008 -0700
37
37
----
38
38
39
39
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.
40
-
As you can see, this command lists each commit with its SHA-1 checksum, the author's name and e-mail, the date written, and the commit message.
40
+
As you can see, this command lists each commit with its SHA-1 checksum, the author's name and email, the date written, and the commit message.
41
41
42
42
A huge number and variety of options to the `git log` command are available to show you exactly what you're looking for.
43
43
Here, we'll show you some of the most popular.
@@ -170,7 +170,7 @@ a11bef0 - Scott Chacon, 6 years ago : first commit
170
170
| `%P` | Parent hashes
171
171
| `%p` | Abbreviated parent hashes
172
172
| `%an` | Author name
173
-
| `%ae` | Author e-mail
173
+
| `%ae` | Author email
174
174
| `%ad` | Author date (format respects the --date=option)
First it confirms where you want to save the key (`.ssh/id_rsa`), and then it asks twice for a passphrase, which you can leave empty if you don't want to type a password when you use the key.
39
39
40
40
Now, each user that does this has to send their public key to you or whoever is administrating the Git server (assuming you're using an SSH server setup that requires public keys).
41
-
All they have to do is copy the contents of the `.pub` file and e-mail it.
41
+
All they have to do is copy the contents of the `.pub` file and email it.
She's ready to push up her work, but gets an e-mail from Josie that a branch with some initial work on it was already pushed to the server as `featureBee`.
379
+
She's ready to push up her work, but gets an email from Josie that a branch with some initial work on it was already pushed to the server as `featureBee`.
380
380
Jessica first needs to merge those changes in with her own before she can push to the server.
381
381
She can then fetch Josie's changes down with `git fetch`:
382
382
@@ -414,7 +414,7 @@ This is called a _refspec_.
414
414
See <<_refspec>> for a more detailed discussion of Git refspecs and different things you can do with them.
415
415
Also notice the `-u` flag; this is short for `--set-upstream`, which configures the branches for easier pushing and pulling later.
416
416
417
-
Next, John e-mails Jessica to say he's pushed some changes to the `featureA` branch and asks her to verify them.
417
+
Next, John emails Jessica to say he's pushed some changes to the `featureA` branch and asks her to verify them.
418
418
She runs a `git fetch` to pull down those changes:
419
419
420
420
[source,console]
@@ -489,7 +489,7 @@ Contributing to public projects is a bit different.
489
489
Because you don't have the permissions to directly update branches on the project, you have to get the work to the maintainers some other way.
490
490
This first example describes contributing via forking on Git hosts that support easy forking.
491
491
Many hosting sites support this (including GitHub, BitBucket, Google Code, repo.or.cz, and others), and many project maintainers expect this style of contribution.
492
-
The next section deals with projects that prefer to accept contributed patches via e-mail.
492
+
The next section deals with projects that prefer to accept contributed patches via email.
493
493
494
494
First, you'll probably want to clone the main repository, create a topic branch for the patch or patch series you're planning to contribute, and do your work there.
495
495
The sequence looks basically like this:
@@ -530,7 +530,7 @@ $ git push -u myfork featureA
530
530
531
531
(((git commands, request-pull)))
532
532
When your work has been pushed up to your fork, you need to notify the maintainer.
533
-
This is often called a pull request, and you can either generate it via the website – GitHub has its own Pull Request mechanism that we'll go over in <<_github>> – or you can run the `git request-pull` command and e-mail the output to the project maintainer manually.
533
+
This is often called a pull request, and you can either generate it via the website – GitHub has its own Pull Request mechanism that we'll go over in <<_github>> – or you can run the `git request-pull` command and email the output to the project maintainer manually.
534
534
535
535
The `request-pull` command takes the base branch into which you want your topic branch pulled and the Git repository URL you want them to pull from, and outputs a summary of all the changes you're asking to be pulled in.
536
536
For instance, if Jessica wants to send John a pull request, and she's done two commits on the topic branch she just pushed up, she can run this:
@@ -618,15 +618,15 @@ Now you can send the maintainer a message that you've made the requested changes
618
618
image::images/public-small-3.png[Commit history after `featureBv2` work.]
619
619
620
620
[[_project_over_email]]
621
-
==== Public Project over E-Mail
621
+
==== Public Project over Email
622
622
623
623
(((contributing, public large project)))
624
624
Many projects have established procedures for accepting patches – you'll need to check the specific rules for each project, because they will differ.
625
625
Since there are several older, larger projects which accept patches via a developer mailing list, we'll go over an example of that now.
626
626
627
627
The workflow is similar to the previous use case – you create topic branches for each patch series you work on.
628
628
The difference is how you submit them to the project.
629
-
Instead of forking the project and pushing to your own writable version, you generate e-mail versions of each commit series and e-mail them to the developer mailing list:
629
+
Instead of forking the project and pushing to your own writable version, you generate email versions of each commit series and email them to the developer mailing list:
630
630
631
631
[source,console]
632
632
-----
@@ -639,8 +639,8 @@ $ git commit
639
639
640
640
(((git commands, format-patch)))
641
641
Now you have two commits that you want to send to the mailing list.
642
-
You use `git format-patch` to generate the mbox-formatted files that you can e-mail to the list – it turns each commit into an e-mail message with the first line of the commit message as the subject and the rest of the message plus the patch that the commit introduces as the body.
643
-
The nice thing about this is that applying a patch from an e-mail generated with `format-patch` preserves all the commit information properly.
642
+
You use `git format-patch` to generate the mbox-formatted files that you can email to the list – it turns each commit into an email message with the first line of the commit message as the subject and the rest of the message plus the patch that the commit introduces as the body.
643
+
The nice thing about this is that applying a patch from an email generated with `format-patch` preserves all the commit information properly.
644
644
645
645
[source,console]
646
646
-----
@@ -684,13 +684,13 @@ index 76f47bc..f9815f1 100644
684
684
2.1.0
685
685
-----
686
686
687
-
You can also edit these patch files to add more information for the e-mail list that you don't want to show up in the commit message.
687
+
You can also edit these patch files to add more information for the email list that you don't want to show up in the commit message.
688
688
If you add text between the `---` line and the beginning of the patch (the `diff --git` line), then developers can read it; but applying the patch excludes it.
689
689
690
-
To e-mail this to a mailing list, you can either paste the file into your e-mail program or send it via a command-line program.
690
+
To email this to a mailing list, you can either paste the file into your email program or send it via a command-line program.
691
691
Pasting the text often causes formatting issues, especially with ``smarter'' clients that don't preserve newlines and other whitespace appropriately.
692
692
Luckily, Git provides a tool to help you send properly formatted patches via IMAP, which may be easier for you.
693
-
We'll demonstrate how to send a patch via Gmail, which happens to be the e-mail agent we know best; you can read detailed instructions for a number of mail programs at the end of the aforementioned `Documentation/SubmittingPatches` file in the Git source code.
693
+
We'll demonstrate how to send a patch via Gmail, which happens to be the email agent we know best; you can read detailed instructions for a number of mail programs at the end of the aforementioned `Documentation/SubmittingPatches` file in the Git source code.
694
694
695
695
(((git commands, config)))(((email)))
696
696
First, you need to set up the imap section in your `~/.gitconfig` file.
Copy file name to clipboardExpand all lines: book/05-distributed-git/sections/maintaining.asc
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
(((maintaining a project)))
4
4
In addition to knowing how to effectively contribute to a project, you'll likely need to know how to maintain one.
5
-
This can consist of accepting and applying patches generated via `format-patch` and e-mailed to you, or integrating changes in remote branches for repositories you've added as remotes to your project.
5
+
This can consist of accepting and applying patches generated via `format-patch` and emailed to you, or integrating changes in remote branches for repositories you've added as remotes to your project.
6
6
Whether you maintain a canonical repository or want to help by verifying or approving patches, you need to know how to accept work in a way that is clearest for other contributors and sustainable by you over the long run.
Now you're ready to add your contributed work into this topic branch and determine if you want to merge it into your longer-term branches.
30
30
31
31
[[_patches_from_email]]
32
-
==== Applying Patches from E-mail
32
+
==== Applying Patches from Email
33
33
34
34
(((email, applying patches from)))
35
-
If you receive a patch over e-mail that you need to integrate into your project, you need to apply the patch in your topic branch to evaluate it.
36
-
There are two ways to apply an e-mailed patch: with `git apply` or with `git am`.
35
+
If you receive a patch over email that you need to integrate into your project, you need to apply the patch in your topic branch to evaluate it.
36
+
There are two ways to apply an emailed patch: with `git apply` or with `git am`.
37
37
38
38
===== Applying a Patch with apply
39
39
@@ -74,7 +74,7 @@ If you can, encourage your contributors to use `format-patch` instead of `diff`
74
74
You should only have to use `git apply` for legacy patches and things like that.
75
75
76
76
To apply a patch generated by `format-patch`, you use `git am`.
77
-
Technically, `git am` is built to read an mbox file, which is a simple, plain-text format for storing one or more e-mail messages in one text file.
77
+
Technically, `git am` is built to read an mbox file, which is a simple, plain-text format for storing one or more email messages in one text file.
78
78
It looks something like this:
79
79
80
80
[source,console]
@@ -88,9 +88,9 @@ Limit log functionality to the first 20
88
88
-----
89
89
90
90
This is the beginning of the output of the format-patch command that you saw in the previous section.
91
-
This is also a valid mbox e-mail format.
92
-
If someone has e-mailed you the patch properly using git send-email, and you download that into an mbox format, then you can point git am to that mbox file, and it will start applying all the patches it sees.
93
-
If you run a mail client that can save several e-mails out in mbox format, you can save entire patch series into a file and then use git am to apply them one at a time.
91
+
This is also a valid mbox email format.
92
+
If someone has emailed you the patch properly using git send-email, and you download that into an mbox format, then you can point git am to that mbox file, and it will start applying all the patches it sees.
93
+
If you run a mail client that can save several emails out in mbox format, you can save entire patch series into a file and then use git am to apply them one at a time.
94
94
95
95
However, if someone uploaded a patch file generated via `format-patch` to a ticketing system or something similar, you can save the file locally and then pass that file saved on your disk to `git am` to apply it:
96
96
@@ -101,7 +101,7 @@ Applying: add limit to log function
101
101
-----
102
102
103
103
You can see that it applied cleanly and automatically created the new commit for you.
104
-
The author information is taken from the e-mail's `From` and `Date` headers, and the message of the commit is taken from the `Subject` and body (before the patch) of the e-mail.
104
+
The author information is taken from the email's `From` and `Date` headers, and the message of the commit is taken from the `Subject` and body (before the patch) of the email.
105
105
For example, if this patch was applied from the mbox example above, the commit generated would look something like this:
106
106
107
107
-----
@@ -187,7 +187,7 @@ When all the patches for your topic are applied and committed into your branch,
187
187
(((branches, remote)))
188
188
If your contribution came from a Git user who set up their own repository, pushed a number of changes into it, and then sent you the URL to the repository and the name of the remote branch the changes are in, you can add them as a remote and do merges locally.
189
189
190
-
For instance, if Jessica sends you an e-mail saying that she has a great new feature in the `ruby-client` branch of her repository, you can test it by adding the remote and checking out that branch locally:
190
+
For instance, if Jessica sends you an email saying that she has a great new feature in the `ruby-client` branch of her repository, you can test it by adding the remote and checking out that branch locally:
191
191
192
192
[source,console]
193
193
-----
@@ -196,10 +196,10 @@ $ git fetch jessica
196
196
$ git checkout -b rubyclient jessica/ruby-client
197
197
-----
198
198
199
-
If she e-mails you again later with another branch containing another great feature, you can fetch and check out because you already have the remote setup.
199
+
If she emails you again later with another branch containing another great feature, you can fetch and check out because you already have the remote setup.
200
200
201
201
This is most useful if you're working with a person consistently.
202
-
If someone only has a single patch to contribute once in a while, then accepting it over e-mail may be less time consuming than requiring everyone to run their own server and having to continually add and remove remotes to get a few patches.
202
+
If someone only has a single patch to contribute once in a while, then accepting it over email may be less time consuming than requiring everyone to run their own server and having to continually add and remove remotes to get a few patches.
203
203
You're also unlikely to want to have hundreds of remotes, each for someone who contributes only a patch or two.
204
204
However, scripts and hosted services may make this easier – it depends largely on how you develop and how your contributors develop.
205
205
@@ -514,14 +514,14 @@ You can also create a zip archive in much the same way, but by passing the `--fo
You now have a nice tarball and a zip archive of your project release that you can upload to your website or e-mail to people.
517
+
You now have a nice tarball and a zip archive of your project release that you can upload to your website or email to people.
518
518
519
519
[[_the_shortlog]]
520
520
==== The Shortlog
521
521
522
522
(((git commands, shortlog)))
523
-
It's time to e-mail your mailing list of people who want to know what's happening in your project.
524
-
A nice way of quickly getting a sort of changelog of what has been added to your project since your last release or e-mail is to use the `git shortlog` command.
523
+
It's time to email your mailing list of people who want to know what's happening in your project.
524
+
A nice way of quickly getting a sort of changelog of what has been added to your project since your last release or email is to use the `git shortlog` command.
525
525
It summarizes all the commits in the range you give it; for example, the following gives you a summary of all the commits since your last release, if your last release was named v1.0.1:
526
526
527
527
[source,console]
@@ -542,4 +542,4 @@ Tom Preston-Werner (4):
542
542
Regenerated gemspec for version 1.0.2
543
543
-----
544
544
545
-
You get a clean summary of all the commits since v1.0.1, grouped by author, that you can e-mail to your list.
545
+
You get a clean summary of all the commits since v1.0.1, grouped by author, that you can email to your list.
0 commit comments