Skip to content

Commit

Permalink
docs: change intendations
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Polyakov <[email protected]>
  • Loading branch information
Jeredian committed Feb 15, 2024
1 parent 9f8e03e commit 875286e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 36 deletions.
42 changes: 21 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Before you submit your Pull Request (PR) consider the following guidelines:

5. In your forked repository, make your changes in a new git branch:

```shell
```shell
git checkout -b my-fix-branch main
```
```

or

```shell
```shell
git checkout -b my-fix-branch develop
```
```

Depends on the base repository branch.

Expand Down Expand Up @@ -144,21 +144,21 @@ In order to update the commit message of the last commit on your branch:
1. Check out your branch:
```shell
```shell
git checkout my-fix-branch
```
```
2. Amend the last commit and modify the commit message:
```shell
```shell
git commit --amend -s
```
```
3. Push to your GitHub repository:
```shell
```shell
git push --force-with-lease
```
```
> NOTE:<br />
> If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode.
Expand All @@ -172,31 +172,31 @@ After your pull request is merged, you can safely delete your branch and pull th

* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

```shell
```shell
git push origin --delete my-fix-branch
```
```

* Check out the main branch:

```shell
```shell
git checkout main -f
```
```

* Delete the local branch:

```shell
```shell
git branch -D my-fix-branch
```
```

* Update your local `main` or `develop` (depends on the base repository branch) with the latest upstream version:

```shell
```shell
git pull --ff upstream main
```
```

```shell
```shell
git pull --ff upstream develop
```
```

## <a name="rules"></a> Coding Rules

Expand Down Expand Up @@ -291,4 +291,4 @@ To sign-off commits see [this guide][HOWTO].
[DCO]: ./dco.md
[Labels]: ./label-system.md
[HOWTO]: ./how_to_sign-off_commits.md
[commit-message-format]: https://www.conventionalcommits.org/en/v1.0.0/
[commit-message-format]: https://www.conventionalcommits.org/en/v1.0.0/
6 changes: 3 additions & 3 deletions dco.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The Print maker Lab project uses a DCO bot for all GitHub pulls to verify that e
If your Pull Request fails the DCO check, it's necessary to fix the entire commit history in the PR. Although this is a situation we'd like to avoid the best practice is to squash the commit history to a single commit, append the DCO sign-off as described above or interactively in the rebase comment editing process, and force push. For example, if you have 2 commits in your history (Note the ~2):

```bash
git rebase HEAD~4 --signoff
(interactive squash + DCO append)
git push origin --force
git rebase HEAD~4 --signoff
(interactive squash + DCO append)
git push origin --force
```

Note, that in general rewriting history in this way is something that can cause issues with the review process and this should only be done to correct a DCO mistake.
18 changes: 9 additions & 9 deletions how_to_sign-off_commits.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ The text can either be manually added to your commit body, or you can add either
Git has a `-s | --signoff` command-line option to append this automatically to your commit message:

```bash
git commit --signoff --message 'chore: this is my commit message'
git commit --signoff --message 'chore: this is my commit message'
```

```bash
git commit -s -m "chore: this is my commit message"
git commit -s -m "chore: this is my commit message"
```

This will use your default git configuration which is found in `.git/config` and usually, it is the `username systemaddress` of the machine which you are using.
Expand All @@ -29,13 +29,13 @@ To change this, you can use the following commands (Note these only change the c
Your name:

```bash
git config user.name "FIRST_NAME LAST_NAME"
git config user.name "FIRST_NAME LAST_NAME"
```

Your email:

```bash
git config user.email "[email protected]"
git config user.email "[email protected]"
```

#### How to sign-off via Visual Studio Code
Expand All @@ -47,7 +47,7 @@ Open the settings, search for “sign-off” and check the box “Enables commit

Alternatively you can add this line to your settings.json :
```
"git.alwaysSignOff": true
"git.alwaysSignOff": true
```

Or, you can sign-off each commit manually
Expand All @@ -59,7 +59,7 @@ Or, you can sign-off each commit manually
If you have authored a commit that is missing the signed-off-by line, you can amend your commits and push them to GitHub

```bash
git commit --amend --signoff
git commit --amend --signoff
```

If you've pushed your changes to GitHub already you'll need to force push your branch after this with `git push -f`.
Expand All @@ -71,7 +71,7 @@ If you miss series of commits, you can use the rebase with `-i | --interactive`
For example, if you have 4 commits in your history (Note the ~4):

```bash
git rebase HEAD~4 --signoff
(interactive squash + DCO append)
git push origin --force
git rebase HEAD~4 --signoff
(interactive squash + DCO append)
git push origin --force
```
3 changes: 0 additions & 3 deletions label-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@

* **status: duplicate** - This issue or pull request already exists.
* **status: won't fix/do** - This will not be worked on.



0 comments on commit 875286e

Please sign in to comment.