CONTRIBUTING: Small improvements (#1123)

* Small improvements to docs

* Corrected branch deletion

* Apply suggestions from code review

Co-authored-by: Hynek Schlawack <hs@ox.cx>

* Applied more review feedback

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
This commit is contained in:
chrysle 2023-04-14 06:38:00 +02:00 committed by GitHub
parent 683d05684e
commit e4c9f2796c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 7 deletions

View File

@ -42,6 +42,7 @@ The official tag is `python-attrs` and helping out in support frees us up to imp
You can (and should) run our test suite using [*tox*]. You can (and should) run our test suite using [*tox*].
However, youll probably want a more traditional environment as well. However, youll probably want a more traditional environment as well.
We highly recommend to develop using the latest Python release because we try to take advantage of modern features whenever possible. We highly recommend to develop using the latest Python release because we try to take advantage of modern features whenever possible.
Also, running [*pre-commit*] later on will require the latest Python version.
First [fork](https://github.com/python-attrs/attrs/fork) the repository on GitHub. First [fork](https://github.com/python-attrs/attrs/fork) the repository on GitHub.
@ -63,7 +64,7 @@ Then add the *attrs* repository as *upstream* remote:
$ git remote add -t main -m main --tags upstream https://github.com/python-attrs/attrs.git $ git remote add -t main -m main --tags upstream https://github.com/python-attrs/attrs.git
``` ```
The next step is to sync the upstream repository with your local copy: The next step is to sync your local copy with the upstream repository:
```console ```console
$ git fetch upstream $ git fetch upstream
@ -98,10 +99,10 @@ $ make html
The built documentation can then be found in `docs/_build/html/`. The built documentation can then be found in `docs/_build/html/`.
To file a pull request, create a new branch on top of the upstream repository: To file a pull request, create a new branch on top of the upstream repository's `main` branch:
```console ```console
$ git fetch --all $ git fetch upstream
$ git checkout -b my_topical_branch upstream/main $ git checkout -b my_topical_branch upstream/main
``` ```
@ -113,12 +114,17 @@ $ git push -u origin
and publish the PR in GitHub's web interface! and publish the PR in GitHub's web interface!
Before starting to work on your next pull request, run the following command to sync your local repository with the remotes: After your pull request is merged and the branch is no longer needed, delete it:
```console ```console
$ git fetch --all
$ git checkout main $ git checkout main
$ git merge $ git push --delete origin my_topical_branch && git branch -D my_topical_branch
```
Before starting to work on your next pull request, run the following command to sync your local repository with the remote *upstream*:
```console
$ git fetch upstream -u main:main
``` ```
--- ---
@ -205,7 +211,7 @@ But it's way more comfortable to run it locally and *git* catching avoidable err
First line of new section. First line of new section.
``` ```
- If you add a new feature, demonstrate its awesomeness on the [examples page](https://github.com/python-attrs/attrs/blob/main/docs/examples.rst)! - If you add a new feature, demonstrate its awesomeness on the [examples page](https://github.com/python-attrs/attrs/blob/main/docs/examples.md)!
### Changelog ### Changelog