Fix typos

pull/99/head
Jakub Wilk 8 years ago
parent 2fa0b60933
commit 4744ae8733

@ -14,7 +14,7 @@ This is a community built document. Dive in and help out!
- If you can, run `doctoc README.md` before adding a new section, or after editing a section - this keeps the Table of Contents up to date. If you don't have it, you can install [DocToc here](https://github.com/thlorenz/doctoc).
- Include the relevant branch before the `$` in a shell command, if needed. If not needed, please do not include a branch name.
- Please label code blocks as `sh` to help out [linguist](https://github.com/github/linguist), unless the language is different.
- Try and put relevant flight rules in the same general area of the document - deletes with deletes, commit ammends with commit ammends, and so on. We're working on making this better, so no worries if it is confusing - just throw the submission on the end.
- Try and put relevant flight rules in the same general area of the document - deletes with deletes, commit amends with commit amends, and so on. We're working on making this better, so no worries if it is confusing - just throw the submission on the end.
- Link to places you found answers or procedures if especially complicated, or if linking to a larger discussion of how to do something. This normally means linking to Stack Overflow.
- Generally, conform to this schema:

@ -133,12 +133,12 @@ $ git add -A
$ git commit --amend
```
This is particularly useful when you have an open patch and you have commited an unnecessary file, and need to force push to update the patch on a remote.
This is particularly useful when you have an open patch and you have committed an unnecessary file, and need to force push to update the patch on a remote.
<a name="delete-pushed-commit"></a>
### I want to delete or remove my last commit
If you need to delete pushed commits, you can use the following. However, it will irreversabily change your history, and mess up the history of anyone else who had already pulled from the repository. In short, if you're not sure, you should never do this, ever.
If you need to delete pushed commits, you can use the following. However, it will irreversibly change your history, and mess up the history of anyone else who had already pulled from the repository. In short, if you're not sure, you should never do this, ever.
```sh
$ git reset HEAD^ --hard
@ -164,7 +164,7 @@ $ git rebase --onto SHA1_OF_BAD_COMMIT^ SHA1_OF_BAD_COMMIT
$ git push -f [remote] [branch]
```
Or do an [interactive rebase](#interactive-rebase) and remove the line(s) correspoding to commit(s) you want to see removed.
Or do an [interactive rebase](#interactive-rebase) and remove the line(s) corresponding to commit(s) you want to see removed.
<a name="#force-push"></a>
### I tried to push my amended commit to a remote, but I got an error message
@ -315,7 +315,7 @@ Confirm that you haven't pushed your changes to the server.
#
```
One way of reseting to match origin (to have the same as what is on the remote) is to do this:
One way of resetting to match origin (to have the same as what is on the remote) is to do this:
```sh
(master)$ git reset --hard origin/my-branch
@ -818,7 +818,7 @@ Your tag should now have been restored.
If someone has sent you a pull request on GitHub, but then deleted their original fork, you will be unable to clone their commits or to use `git am`. In such cases, it is best to manually look at their commits and copy them into a new branch on your local. Then, commit.
After commiting, change the author of the previous commit. To do this, see how to [change author](#commit-wrong-author). Then, apply whatever changes needed on to, and make a new pull request.
After committing, change the author of the previous commit. To do this, see how to [change author](#commit-wrong-author). Then, apply whatever changes needed on to, and make a new pull request.
## Tracking Files
@ -897,13 +897,13 @@ c10f740 HEAD@{2}: checkout: moving from master to 2.2
The reflog above shows a checkout from master to the 2.2 branch and back. From there, there's a hard reset to an older commit. The latest activity is represented at the top labeled `HEAD@{0}`.
If it turns out that you accidentially moved back, the reflog will contain the commit master pointed to (0254ea7) before you accidentially dropped 2 commits.
If it turns out that you accidentally moved back, the reflog will contain the commit master pointed to (0254ea7) before you accidentally dropped 2 commits.
```sh
$ git reset --hard 0254ea7
```
Using git reset it is then possible to change master back to the commit it was before. This provides a safety net in case history was accidentially changed.
Using git reset it is then possible to change master back to the commit it was before. This provides a safety net in case history was accidentally changed.
(copied and edited from [Source](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog)).

Loading…
Cancel
Save