Skip to content

Commit ee58a54

Browse files
Update Git docs to use main as target branch (#71)
1 parent 3453780 commit ee58a54

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

git/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ General Guidelines
2121
------------------
2222

2323
* Avoid including files that are specific to your own environment.
24-
* Avoid committing directly to `master`.
24+
* Avoid committing directly to `main`.
2525
* Perform all work in a feature branch.
2626
* Rebase frequently to incorporate upstream changes.
2727
* Use a [pull request] for code reviews.
@@ -30,10 +30,10 @@ General Guidelines
3030
Writing a Feature
3131
-----------------
3232

33-
### Create a local feature branch based off master
33+
### Create a local feature branch based off main
3434

3535
```
36-
git checkout master
36+
git checkout main
3737
git pull
3838
git checkout -b <branch-name>
3939
```
@@ -57,7 +57,7 @@ as well as within any Git GUI apps.
5757

5858
```
5959
git fetch origin
60-
git rebase origin/master
60+
git rebase origin/main
6161
```
6262

6363
Resolve conflicts. When feature is in a good state, stage the changes
@@ -79,7 +79,7 @@ If you've created more than one commit, use a rebase to squash them into
7979
cohesive commits with good messages:
8080

8181
```
82-
git rebase -i origin/master
82+
git rebase -i origin/main
8383
```
8484

8585
### Push your branch
@@ -114,13 +114,13 @@ Edit commit messages to reveal intent. Run tests.
114114

115115
```
116116
git fetch origin
117-
git rebase -i origin/master
117+
git rebase -i origin/main
118118
```
119119

120120
### Force-Pushing
121121

122122
This allows GitHub to automatically close your pull
123-
request and mark it as merged when your commit(s) are pushed to master. It also
123+
request and mark it as merged when your commit(s) are pushed to `main`. It also
124124
makes it possible to find the pull request that brought in your changes.
125125

126126
```
@@ -131,7 +131,7 @@ git push --force origin <branch-name>
131131

132132
Force-pushing may not always be appropriate for every project, depending on
133133
other factors like hooks or continuous integration. Pull Requests may also be
134-
merged into `master` (or whatever their target branch is) by simply
134+
merged into `main` (or whatever their target branch is) by simply
135135
clicking the green "Merge Branch" button on the GitHub Pull Request page.
136136

137137
Note that GitHub offers three merge options: a merge commit, rebase and merge,

0 commit comments

Comments
 (0)