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
Copy file name to clipboardExpand all lines: docs/contributing/first-time.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,18 +158,20 @@ _Plone git workflow_
158
158
159
159
Once you have your environment set up, then you can follow standard best practices for working with git.
160
160
161
-
Always start by checking out the default branch, usually `main` or `master`, then update the default branch.
161
+
In the following command examples, we will use `main` as the default branch, although `master` may still be in use for some repositories.
162
+
163
+
Always start by checking out the default branch then update the default branch.
162
164
163
165
```shell
164
166
git checkout main
165
167
git pull
166
168
```
167
169
168
-
Then create a new branch from the default branch, and check it out to work on it.
170
+
Then create a new branch from the default branch, tracking the upstream Plone repository, and check it out to work on it.
169
171
We recommend using a branch name that includes the issue number and is descriptive of what it resolves.
170
172
171
173
```shell
172
-
git checkout -b branch_name
174
+
git checkout -b my-branch-name upstream/main
173
175
```
174
176
175
177
Now you can edit your code without affecting the default branch.
@@ -206,7 +208,7 @@ Once you have completed, tested, and linted your code, and created a {ref}`contr
206
208
```shell
207
209
git add <files>
208
210
git commit -m "My commit message"
209
-
git push
211
+
git push origin my-branch-name
210
212
```
211
213
212
214
1. Visit your fork of the Plone repository on GitHub, and [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) against the development branch.
@@ -229,9 +231,9 @@ To keep your pull request current, you can issue the follow git commands.
229
231
# Assume `main` is the main branch.
230
232
git checkout main
231
233
git pull
232
-
git checkout my_branch_name
234
+
git checkout my-branch-name
233
235
git merge main
234
-
git push
236
+
git push origin my-branch-name
235
237
```
236
238
237
239
Welcome to the Plone community, and thank you for contributing!
0 commit comments