forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contributing: Validate Markdown files
* linter: turn Markdown validation on * Markdown files cleanup
- Loading branch information
Showing
19 changed files
with
418 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,36 +23,34 @@ GRASS GIS developer mailing list. | |
of the GitHub interface). | ||
* Clone your fork (use HTTPS or SSH URL, here we will use HTTPS): | ||
|
||
``` | ||
git clone https://github.com/your_GitHub_account/grass.git | ||
```bash | ||
git clone git@github.com:your_GH_account/grass.git | ||
``` | ||
|
||
* Enter the directory | ||
|
||
``` | ||
```bash | ||
cd grass/ | ||
``` | ||
|
||
* Add main GRASS GIS repository as "upstream" (use HTTPS URL): | ||
|
||
``` | ||
```bash | ||
git remote add upstream https://github.com/OSGeo/grass | ||
``` | ||
|
||
* Your remotes now should be "origin" which is your fork and "upstream" which | ||
is this main GRASS GIS repository. You can confirm that using: | ||
|
||
``` | ||
```bash | ||
git remote -v | ||
``` | ||
|
||
* You should see something like: | ||
|
||
``` | ||
origin https://github.com/your_GH_account/grass.git (fetch) | ||
origin https://github.com/your_GH_account/grass.git (push) | ||
upstream https://github.com/OSGeo/grass.git (fetch) | ||
upstream https://github.com/OSGeo/grass.git (push) | ||
```bash | ||
origin [email protected]:your_GH_account/grass.git (fetch) | ||
origin [email protected]:your_GH_account/grass.git (push) | ||
``` | ||
|
||
For the following workflow, it is important that | ||
|
@@ -64,20 +62,20 @@ and "origin" to your fork | |
|
||
* Make sure your are using the _main_ branch to create the new branch: | ||
|
||
``` | ||
git switch main | ||
```bash | ||
git checkout main | ||
``` | ||
|
||
* Download updates from all branches from the _upstream_ remote: | ||
|
||
``` | ||
```bash | ||
git fetch upstream | ||
``` | ||
|
||
* Update your local _main_ branch to match the _main_ branch | ||
in the _upstream_ repository: | ||
|
||
``` | ||
```bash | ||
git rebase upstream/main | ||
``` | ||
|
||
|
@@ -90,19 +88,19 @@ rebase or merge happens). | |
If `rebase` fails with "error: cannot rebase: You have unstaged changes...", | ||
then move your uncommitted local changes to "stash" using: | ||
|
||
``` | ||
```bash | ||
git stash | ||
``` | ||
|
||
* Now you can rebase: | ||
|
||
``` | ||
```bash | ||
git rebase upstream/main | ||
``` | ||
|
||
* Get the changes back from stash: | ||
|
||
``` | ||
```bash | ||
git stash pop | ||
``` | ||
|
||
|
@@ -113,7 +111,7 @@ based on it. | |
|
||
* Create a new feature branch and switch to it: | ||
|
||
``` | ||
```bash | ||
git checkout -b new-feature | ||
``` | ||
|
||
|
@@ -142,29 +140,29 @@ request comment. | |
|
||
Note that there are some steps you can do locally to improve your code. | ||
For Python, run `black .` to apply standardized formatting. You can | ||
also run linter tools such as Pylint which will suggest different improvements | ||
also run linter tools such as Pylint which will suggest different improvements | ||
to your code. | ||
|
||
### Committing | ||
|
||
* Add files to the commit (changed ones or new ones): | ||
|
||
``` | ||
```bash | ||
git add file1 | ||
git add file2 | ||
``` | ||
|
||
* Commit the change (first word is the module name): | ||
|
||
``` | ||
```bash | ||
git commit -m "module: added a new feature" | ||
``` | ||
|
||
### Pushing changes to GitHub | ||
|
||
* Push your local feature branch to your fork: | ||
|
||
``` | ||
```bash | ||
git push origin new-feature | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.