Skip to content

Commit 6cca9ba

Browse files
authored
Merge branch 'master' into bugfix/issue-351
2 parents f00c42e + efb92b2 commit 6cca9ba

File tree

10 files changed

+58
-505
lines changed

10 files changed

+58
-505
lines changed

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Thanks for contributing! -->
2+
<!-- Before you start on a large rewrite or other major change: open a new issue first, to discuss the proposed changes. -->
3+
<!-- Should your changes appear in a printed edition, you'll be included in the contributors list. -->
4+
5+
<!-- Mark the checkbox [X] or [x] if you agree with the item. -->
6+
- [ ] I provide my work under the [project license](https://github.com/progit/progit2/blob/master/LICENSE.asc).
7+
- [ ] I grant such license of my work as is required for the purposes of future print editions to [Ben Straub](https://github.com/ben) and [Scott Chacon](https://github.com/schacon).
8+
9+
## Changes
10+
11+
-
12+
13+
## Context
14+
<!--
15+
List related issues.
16+
Provide the necessary context to understand the changes you made.
17+
18+
Are you fixing a issue with this pull-request?
19+
Use the "Fixes" keyword, to close the issue automatically after your work is merged.
20+
21+
Fixes #123
22+
Fixes #456
23+
-->

C-git-commands.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ The `git filter-branch` command is used to rewrite loads of commits according to
568568

569569
In <<ch07-git-tools#_removing_file_every_commit>> we explain the command and explore several different options such as `--commit-filter`, `--subdirectory-filter` and `--tree-filter`.
570570

571-
In <<ch09-git-and-other-systems#_git_p4>> and <<ch09-git-and-other-systems#_git_tfs>> we use it to fix up imported external repositories.
571+
In <<ch09-git-and-other-systems#_git_p4>> we use it to fix up imported external repositories.
572572

573573

574574
=== Plumbing Commands

CONTRIBUTING.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
# Contributing to Pro Git (2nd Edition)
22

3-
## Licensing
3+
## Licensing your work to us
44

5-
By opening a pull request to this repository, you agree to provide your work under the [project license](LICENSE.asc).
5+
When you open a pull request, you agree to provide your work under the [project license](LICENSE.asc).
66
Also, you agree to grant such license of your work as is required for the purposes of future print editions to @ben and @schacon.
77
Should your changes appear in a printed edition, you'll be included in the [contributors list](book/contributors.asc).
88

99
## Signaling an Issue
1010

11-
Before signaling an issue, please check that there isn't already a similar one in the bug tracking system.
11+
Search for similar issues, before creating a new issue.
1212

13-
Also, if this issue has been spotted on the git-scm.com site, please cross-check that it is still present in the pdf version.
14-
The issue may have already been corrected, but the changes have not been deployed yet.
13+
Also, if this issue has been spotted on the git-scm.com site, cross-check that the issue is present in the pdf version.
14+
The issue may have already been corrected in the source files, but not yet deployed to the git-scm.com site.
1515

1616
## Small Corrections
1717

1818
Errata and basic clarifications will be accepted if we agree that they improve the content.
19-
You can also open an issue so we can figure out how or if it needs to be addressed.
19+
You can also open an issue so that we can discuss how or if the issue needs to be addressed.
2020

2121
If you've never done this before, the [flow guide](https://guides.github.com/introduction/flow/) might be useful.
2222

2323
## Large Rewrites
2424

2525
Open an issue for discussion before you start.
26-
These changes tend to be very subjective, often only clarifying things for some small percentage of people and it's rarely worth the time to accept them.
27-
Professional copy editors have already reviewed this content multiple times so while you may have somewhat better taste and grammar than we do it's unlikely that your prose is going to be *so* much better that it's worth changing vast swaths of text.
26+
A large rewrite tends to be very subjective, often only clarifying things for a small amount of readers.
27+
Professional copy editors have already reviewed this content multiple times.
28+
It's unlikely that your prose is going to be *so* much better that it's worth changing large portions of text.
2829

2930
## Figures
3031

31-
The images in this book were generated using [Sketch 3](https://www.sketchapp.com/), with the [included sketchbook file](diagram-source/progit.sketch).
32+
The images in this book are generated using [Sketch 3](https://www.sketchapp.com/), with the [included sketchbook file](diagram-source/progit.sketch).
3233

33-
To add a figure:
34+
To create a figure:
3435

3536
1. Add a page to the sketchbook.
36-
Try to use the included symbols wherever possible.
37+
Use the included symbols wherever possible.
3738
2. Add a "slice" to your page.
38-
Give it a name that matches the destination PNG filename, relative from the root of the source directory.
39-
3. Make sure your slice is set to export at "800w".
40-
39+
Name the slice so that it matches the destination PNG filename, relative from the root of the source directory.
40+
3. Set your slice to export at "800w".
4141

4242
## Translations
4343

44-
If you would like to contribute to translating Pro Git into your language, take a look at [TRANSLATING.md](TRANSLATING.md).
44+
If you want to contribute to translating Pro Git into your language, take a look at [TRANSLATING.md](TRANSLATING.md).

book/01-introduction/sections/first-time-setup.asc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can also change them at any time by running through the commands again.
88
Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates.(((git commands, config)))
99
These variables can be stored in three different places:
1010

11-
1. `/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
11+
1. `[path]/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
1212
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
1313
Because this is a system configuration file, you would need administrative or superuser privilege to make changes to it.
1414
2. `~/.gitconfig` or `~/.config/git/config` file: Values specific personally to you, the user.
@@ -17,10 +17,10 @@ These variables can be stored in three different places:
1717
You can force Git to read from and write to this file with the `--local` option, but that is in fact the default.
1818
Unsurprisingly, you need to be located somewhere in a Git repository for this option to work properly.
1919

20-
Each level overrides values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`.
20+
Each level overrides values in the previous level, so values in `.git/config` trump those in `[path]/etc/gitconfig`.
2121

2222
On Windows systems, Git looks for the `.gitconfig` file in the `$HOME` directory (`C:\Users\$USER` for most people).
23-
It also still looks for `/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.
23+
It also still looks for `[path]/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.
2424
If you are using version 2.x or later of Git for Windows, there is also a system-level config file at
2525
`C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and in `C:\ProgramData\Git\config` on Windows Vista and newer.
2626
This config file can only be changed by `git config -f <file>` as an admin.
@@ -84,6 +84,18 @@ You may find, if you don't setup your editor like this, you get into a really co
8484
An example on a Windows system may include a prematurely terminated Git operation during a Git initiated edit.
8585
====
8686

87+
==== Your default branch name
88+
89+
By default Git will create a branch called _master_ when you create a new repository with `git init`.
90+
From Git version 2.28 onwards, you can set a different name for the initial branch.
91+
92+
To set _main_ as the default branch name do:
93+
94+
[source,console]
95+
----
96+
$ git config --global init.defaultBranch main
97+
----
98+
8799
==== Checking Your Settings
88100

89101
If you want to check your configuration settings, you can use the `git config --list` command to list all the settings Git can find at that point:
@@ -100,7 +112,7 @@ color.diff=auto
100112
...
101113
----
102114

103-
You may see keys more than once, because Git reads the same key from different files (`/etc/gitconfig` and `~/.gitconfig`, for example).
115+
You may see keys more than once, because Git reads the same key from different files (`[path]/etc/gitconfig` and `~/.gitconfig`, for example).
104116
In this case, Git uses the last value for each unique key it sees.
105117

106118
You can also check what Git thinks a specific key's value is by typing `git config <key>`:(((git commands, config)))

book/08-customizing-git/sections/config.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ git config --global user.email [email protected]
1414
Now you'll learn a few of the more interesting options that you can set in this manner to customize your Git usage.
1515

1616
First, a quick review: Git uses a series of configuration files to determine non-default behavior that you may want.
17-
The first place Git looks for these values is in the system-wide `/etc/gitconfig` file, which contains settings that are applied to every user on the system and all of their repositories.
17+
The first place Git looks for these values is in the system-wide `[path]/etc/gitconfig` file, which contains settings that are applied to every user on the system and all of their repositories.
1818
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
1919

2020
The next place Git looks is the `~/.gitconfig` (or `~/.config/git/config`) file, which is specific to each user.
@@ -24,7 +24,7 @@ Finally, Git looks for configuration values in the configuration file in the Git
2424
These values are specific to that single repository, and represent passing the `--local` option to `git config`.
2525
If you don't specify which level you want to work with, this is the default.
2626

27-
Each of these ``levels'' (system, global, local) overwrites values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`, for instance.
27+
Each of these ``levels'' (system, global, local) overwrites values in the previous level, so values in `.git/config` trump those in `[path]/etc/gitconfig`, for instance.
2828

2929
[NOTE]
3030
====

0 commit comments

Comments
 (0)