Skip to content

Commit 1cfa3b5

Browse files
committed
Alter git commands to track upstream and push to origin
1 parent f64043c commit 1cfa3b5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/contributing/first-time.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,20 @@ _Plone git workflow_
158158

159159
Once you have your environment set up, then you can follow standard best practices for working with git.
160160

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.
162164

163165
```shell
164166
git checkout main
165167
git pull
166168
```
167169

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.
169171
We recommend using a branch name that includes the issue number and is descriptive of what it resolves.
170172

171173
```shell
172-
git checkout -b branch_name
174+
git checkout -b my-branch-name upstream/main
173175
```
174176

175177
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
206208
```shell
207209
git add <files>
208210
git commit -m "My commit message"
209-
git push
211+
git push origin my-branch-name
210212
```
211213

212214
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.
229231
# Assume `main` is the main branch.
230232
git checkout main
231233
git pull
232-
git checkout my_branch_name
234+
git checkout my-branch-name
233235
git merge main
234-
git push
236+
git push origin my-branch-name
235237
```
236238

237239
Welcome to the Plone community, and thank you for contributing!

0 commit comments

Comments
 (0)