style-guide: organize content and update sections; *: fix Markdownlint errors (#12148)
* style-guide: organize content and add contents section * style-guide: fix general writing section title * style-guide: fix heading level of help and version commands * style-guide: fix heading level of see also section * cleanup: update files Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * contributing: fix page for markdown lint Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * fix: markdownlint errors across files Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * docs: improve documentation about keycaps Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * docs: add info about optional and string placeholders Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * cleanup: sync changes with recent versions of style guide Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * cleanup: update style guide Co-authored-by: Vítor Henrique <87824454+vitorhcl@users.noreply.github.com> * docs: update style guide Co-authored-by: Vítor Henrique <87824454+vitorhcl@users.noreply.github.com> * docs/style-guide: reword more info links section Co-authored-by: Vítor Henrique <87824454+vitorhcl@users.noreply.github.com> --------- Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# Using Git
|
||||
|
||||
## Opening a Pull Request
|
||||
|
||||
Most people submit pull requests to the tldr-pages project
|
||||
@@ -61,6 +62,7 @@ git fetch upstream main
|
||||
git rebase upstream/main # in case you have any merge conflicts, click the link below to see how to resolve them
|
||||
git push --force-with-lease # not needed if you only want to update your local repository
|
||||
```
|
||||
|
||||
[How to resolve merge conflicts](https://docs.github.com/en/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line)
|
||||
|
||||
## Changing the email of your last commit
|
||||
@@ -74,15 +76,18 @@ git push --force-with-lease
|
||||
|
||||
## Changing the email of any commit(s)
|
||||
|
||||
1. Perform an [interactive rebase](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--i), specifying the reference of the earliest commit to modify as the argument. For example, if the earliest commit with the wrong email address was 6 commits ago, you can specify the commit hash or just `HEAD~6`.
|
||||
1. Perform an [interactive rebase](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--i), specifying the reference of the earliest commit to modify as the argument.
|
||||
For example, if the earliest commit with the wrong email address was 6 commits ago, you can specify the commit hash (check it with `git log`) or just `HEAD~6`.
|
||||
|
||||
```bash
|
||||
git rebase --interactive HEAD~6
|
||||
```
|
||||
|
||||
2. You'll see a list of commits starting from the referenced commit to `HEAD`. All of them will default to the instruction `pick`, this means using the commit as-is when replaying them. For the commits you want to edit, replace the word `pick` with `edit`, then save and exit the editor.
|
||||
2. You'll see a list of commits starting from the referenced commit to `HEAD`. All of them will default to the instruction `pick`, this means using the commit as-is when replaying them.
|
||||
For the commits you want to edit, replace the word `pick` with `edit`, then save and exit the editor.
|
||||
|
||||
3. The branch will rewind to the referenced commit, then replay them until it reaches a commit with the `edit` instruction. Amend the commit for the correct email address, then continue rebasing. Repeat this step until you've successfully finished rebasing and replayed all commits.
|
||||
3. The branch will rewind to the referenced commit, then replay them until it reaches a commit with the `edit` instruction. Amend the commit for the correct email address, then continue rebasing.
|
||||
Repeat this step until you've successfully finished rebasing and replayed all commits.
|
||||
|
||||
```bash
|
||||
git commit --amend --author "Your Name <correct@example.org>"
|
||||
|
Reference in New Issue
Block a user