Skip to content

Commit 172bf39

Browse files
Robert-MacWhaPatrickAlphaC
authored andcommitted
doc: instruction for re-writing history to sign commits (security-alliance#156)
1 parent ad9734c commit 172bf39

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,20 @@ There are currently several ways to collaborate:
2626
3. Forking the repository and creating a pull request to the develop branch
2727
4. Commenting directly on the deployed version
2828

29-
> ⚠️ Please sign and verify every commit.
29+
> ⚠️ Please sign and verify every commit. If you've accidentally created unsigned
30+
> commits in your history, you can resolve them by setting up [signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#gpg-commit-signature-verification)
31+
> on github and re-writing your history using the below commands.
32+
>
33+
> ```
34+
> git pull origin develop
35+
> git reset --soft develop
36+
> git commit -s -m "Commit Message"
37+
> git push --force
38+
> ```
3039
3140
### Framework-specific branches
3241
33-
Before contributing, check if there's a [Steward](src/contribute/stewards.md) for the specific framework you're interested in, and reach out. We usually have separate branches pre-develop for frameworks with stewards.
42+
Before contributing, check if there's a [Steward](src/contribute/stewards.md) for the specific framework you're interested in, and reach out. We usually have separate branches pre-develop for frameworks with stewards.
3443
3544
The naming convention is `fw_framework_name`, for example `fw_opsec`, `fw_community_mgmt`. Ideally, you'll fork these framework-specific branches, as they typically have more updated information than what's available in the develop branch.
3645
@@ -49,14 +58,15 @@ To comment on the live version of the book under development, you will need to l
4958
5059
1. Fork the repository. Click on the "Fork" button at the top right corner of the page.
5160
2. Clone the forked repository to your local machine. Open your terminal or command prompt.
52-
`git clone https://github.com/your-username/frameworks.git`
61+
`git clone https://github.com/your-username/frameworks.git`
5362
3. Check if there's a framework-specific branch you should be working on. If yes, use that branch instead of develop.
5463
4. Otherwise, make sure you're in the develop branch:
55-
`git checkout develop`
64+
`git checkout develop`
5665
5. Inside the folder create a new branch based on the appropriate branch:
57-
`git checkout -b your-feature-branch`
66+
`git checkout -b your-feature-branch`
5867
6. Make your changes.
5968
7. If adding new pages, consider adding appropriate tags in the frontmatter. Example:
69+
6070
```
6171
---
6272
tags:
@@ -66,15 +76,16 @@ tags:
6676
- SRE
6777
---
6878
```
79+
6980
8. If adding significant content, add attribution using the contributors system (see [using-contributors.md](src/config/using-contributors.md)).
7081
9. Make sure your changes don't break anything by testing it in the local setup:
71-
`./serve.sh`
82+
`./serve.sh`
7283
10. Commit your changes:
73-
`git add .`
84+
`git add .`
7485
11. Commit the changes with a descriptive message:
75-
`git commit -S -m "Fixing typos and improving readability on XXX section"`
86+
`git commit -S -m "Fixing typos and improving readability on XXX section"`
7687
12. Push the changes to your forked repository:
77-
`git push origin your-feature-branch`
88+
`git push origin your-feature-branch`
7889
13. Create a pull request. Go to your forked repository on GitHub. You should see a "Compare & pull request" button. Click on it. Provide a descriptive title and description for your pull request.
7990
14. Click on the "Create pull request" button.
8091
15. Wait for review. Once your pull request is approved, and no more changes are needed, we will merge it into the appropriate branch.

0 commit comments

Comments
 (0)