@@ -21,7 +21,7 @@ General Guidelines
21
21
------------------
22
22
23
23
* Avoid including files that are specific to your own environment.
24
- * Avoid committing directly to ` master ` .
24
+ * Avoid committing directly to ` main ` .
25
25
* Perform all work in a feature branch.
26
26
* Rebase frequently to incorporate upstream changes.
27
27
* Use a [ pull request] for code reviews.
@@ -30,10 +30,10 @@ General Guidelines
30
30
Writing a Feature
31
31
-----------------
32
32
33
- ### Create a local feature branch based off master
33
+ ### Create a local feature branch based off main
34
34
35
35
```
36
- git checkout master
36
+ git checkout main
37
37
git pull
38
38
git checkout -b <branch-name>
39
39
```
@@ -57,7 +57,7 @@ as well as within any Git GUI apps.
57
57
58
58
```
59
59
git fetch origin
60
- git rebase origin/master
60
+ git rebase origin/main
61
61
```
62
62
63
63
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
79
79
cohesive commits with good messages:
80
80
81
81
```
82
- git rebase -i origin/master
82
+ git rebase -i origin/main
83
83
```
84
84
85
85
### Push your branch
@@ -114,13 +114,13 @@ Edit commit messages to reveal intent. Run tests.
114
114
115
115
```
116
116
git fetch origin
117
- git rebase -i origin/master
117
+ git rebase -i origin/main
118
118
```
119
119
120
120
### Force-Pushing
121
121
122
122
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
124
124
makes it possible to find the pull request that brought in your changes.
125
125
126
126
```
@@ -131,7 +131,7 @@ git push --force origin <branch-name>
131
131
132
132
Force-pushing may not always be appropriate for every project, depending on
133
133
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
135
135
clicking the green "Merge Branch" button on the GitHub Pull Request page.
136
136
137
137
Note that GitHub offers three merge options: a merge commit, rebase and merge,
0 commit comments