Skip to content

Commit

Permalink
Improve the contribution page (#29)
Browse files Browse the repository at this point in the history
* Add the fork mechanism

* Update workflow
  • Loading branch information
aboucaud authored Oct 25, 2021
1 parent 3d93b1f commit 07dab15
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ To create an issue, go to https://github.com/aboucaud/galcheat/issues/new, provi

## Pull-requests

To add, update or correct information, the first step is to setup a development environment for `galcheat`
To add, update or correct information, the first step is to setup a development environment for `galcheat` and then create feature branches for a given [pull-request](https://github.com/aboucaud/galcheat/pulls).

> Note that you will have to [fork the project](https://guides.github.com/activities/forking/) to contribute.
### Getting a development environment (do once)

Expand All @@ -49,11 +51,33 @@ To add, update or correct information, the first step is to setup a development
pre-commit install
```

### Create a fork (do once)

- [Fork the galcheat project](https://guides.github.com/activities/forking/)
- Add the fork to the list of remote servers
```sh
git remote add fork [email protected]:<your username>/galcheat.git
```

### Code in a feature branch

1. Don't forget to activate the development environment: `source dev-venv/bin/activate`.
2. Create in a feature branch:
`git checkout -b <feat-branch>`.
3. Commit your code into `<feat-branch>` (sometimes the commit will be rejected because of the `pre-commit` checks, just add the files a second time).
4. Make sure to integrate the latest changes by regularly incorporating the latest work of the main branch into yours: `git rebase origin/main` and solve the conflicts, if any.
5. Push your feature branch and create a pull-request.
1. Activate the development environment
```sh
source dev-venv/bin/activate
```
2. Create a feature branch (e.g. `featbranch` here)
```sh
git checkout -b featbranch
```
3. Commit your code into `featbranch` (sometimes the commit will be rejected because of the `pre-commit` checks, just add the files a second time and commit again).
4. Make sure to integrate the latest changes by regularly incorporating the latest work of the main branch into yours
```sh
git rebase origin/main
```
and solve the conflicts, if any.
5. Push your feature branch to your fork
```sh
git push -u fork featbranch # the first time to set the target remote
git push # afterwards
```
6. Create [the pull-request](https://github.com/aboucaud/galcheat/pulls) and iterate from 3. until it is merged.

0 comments on commit 07dab15

Please sign in to comment.