|
@@ -37,7 +37,7 @@ on GitHub.
|
|
## Changing code and documentation
|
|
## Changing code and documentation
|
|
|
|
|
|
This guide covers contributing to the main version of GRASS GIS source
|
|
This guide covers contributing to the main version of GRASS GIS source
|
|
-code which is the master branch.
|
|
|
|
|
|
+code which is in the branch called _main_.
|
|
It assumes that you have some very basic knowledge of Git and GitHub,
|
|
It assumes that you have some very basic knowledge of Git and GitHub,
|
|
but if you don't just go through some tutorial online or ask on the
|
|
but if you don't just go through some tutorial online or ask on the
|
|
GRASS GIS developer mailing list.
|
|
GRASS GIS developer mailing list.
|
|
@@ -86,22 +86,23 @@ It is important that "origin" points to your fork.
|
|
|
|
|
|
### Update before creating a feature branch
|
|
### Update before creating a feature branch
|
|
|
|
|
|
-* Make sure your are using master branch:
|
|
|
|
|
|
+* Make sure your are using the _main_ branch to create the new branch:
|
|
|
|
|
|
```
|
|
```
|
|
-git checkout master
|
|
|
|
|
|
+git checkout main
|
|
```
|
|
```
|
|
|
|
|
|
-* Download updates from all branches from all remotes:
|
|
|
|
|
|
+* Download updates from all branches from the _upstream_ remote:
|
|
|
|
|
|
```
|
|
```
|
|
git fetch upstream
|
|
git fetch upstream
|
|
```
|
|
```
|
|
|
|
|
|
-* Update your local master branch to match master in the main repository:
|
|
|
|
|
|
+* Update your local _main_ branch to match the _main_ branch
|
|
|
|
+ in the _upstream_ repository:
|
|
|
|
|
|
```
|
|
```
|
|
-git rebase upstream/master
|
|
|
|
|
|
+git rebase upstream/main
|
|
```
|
|
```
|
|
|
|
|
|
### Update if you have local branches
|
|
### Update if you have local branches
|
|
@@ -116,7 +117,7 @@ git stash
|
|
* Now you can rebase:
|
|
* Now you can rebase:
|
|
|
|
|
|
```
|
|
```
|
|
-git rebase upstream/master
|
|
|
|
|
|
+git rebase upstream/main
|
|
```
|
|
```
|
|
|
|
|
|
* Apply your local changes on top:
|
|
* Apply your local changes on top:
|
|
@@ -133,7 +134,7 @@ git stash pop
|
|
|
|
|
|
### Creating a new feature branch
|
|
### Creating a new feature branch
|
|
|
|
|
|
-Now you have updated your local master branch, you can create a feature branch
|
|
|
|
|
|
+Now you have updated your local _main_ branch, you can create a feature branch
|
|
based on it.
|
|
based on it.
|
|
|
|
|
|
* Create a new feature branch and switch to it:
|
|
* Create a new feature branch and switch to it:
|
|
@@ -186,11 +187,11 @@ GRASS GIS maintainers will now review your pull request.
|
|
If needed, the maintainers will work with you to improve your changes.
|
|
If needed, the maintainers will work with you to improve your changes.
|
|
|
|
|
|
Once the changes in the pull request are ready to be accepted,
|
|
Once the changes in the pull request are ready to be accepted,
|
|
-the maintainers will decide if it is more appropriate to:
|
|
|
|
|
|
+the maintainers will usually squash all your commits into one commit and merge it
|
|
|
|
+to the _main_ branch.
|
|
|
|
|
|
-* merge your feature branch,
|
|
|
|
-* squash all commit into one commit, or
|
|
|
|
-* rebase (i.e., replay) all commits on top of the master branch.
|
|
|
|
|
|
+Once the pull request is merged, it is a good time to update your
|
|
|
|
+local _main_ branch in order to get the change you just contributed.
|
|
|
|
|
|
### Further notes
|
|
### Further notes
|
|
|
|
|