add tutorial how to squash commits in git
Signed-off-by: Marek Küthe <m.k@mk16.de>
This commit is contained in:
parent
4ab4dd8c4a
commit
e87c39405f
|
@ -30,5 +30,24 @@ The edb repository currently contains two different scripts:
|
|||
| `test.sh` | Tests the JSON files for validity |
|
||||
| `build_maxlen_filter.sh` | Builds a bird-compatible filter list |
|
||||
|
||||
## Do I need to sqash my commits before setting a PR?
|
||||
Yes and No. Changes to files should be traceable. Therefore, a commit is recommended for every change. However, we also want to avoid more than 30 commits for one file in one PR. Therefore, if there are still mistakes in the initial registration, it would be nice to keep the number of commits within limits.
|
||||
|
||||
With the following commands you can squash two commits to one:
|
||||
```
|
||||
git rebase -i HEAD~2
|
||||
```
|
||||
Replace the second `pick` with `s` or `squash`. Save the file and exit.
|
||||
Enter your new commit message. Save the file and exit.
|
||||
Sign the commit with the following command:
|
||||
```
|
||||
git commit --amend -s -S
|
||||
```
|
||||
|
||||
After that you can upload the changes. If the Git server rejects the changes, you can use the following command:
|
||||
```
|
||||
git push -f
|
||||
```
|
||||
|
||||
## License
|
||||
The edb is available under the AGPL v3 license. More information is available in the `LICENSE.md` in the repository of the edb.
|
||||
|
|
Loading…
Reference in New Issue