Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONTRIBUTING: Small improvements #1123

Merged
merged 5 commits into from Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/CONTRIBUTING.md
Expand Up @@ -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*].
However, you’ll 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.
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.

Expand All @@ -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
```

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
$ git fetch upstream
Expand Down Expand Up @@ -98,10 +99,10 @@ $ make 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
$ git fetch --all
chrysle marked this conversation as resolved.
Show resolved Hide resolved
$ git fetch upstream
$ git checkout -b my_topical_branch upstream/main
```

Expand All @@ -113,12 +114,17 @@ $ git push -u origin

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
$ git fetch --all
$ 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
```

---
Expand Down Expand Up @@ -205,7 +211,7 @@ But it's way more comfortable to run it locally and *git* catching avoidable err
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
Expand Down