### I want to stage my unstaged edits, and unstage my staged edits
@ -459,7 +455,6 @@ $ git branch -a
$ git checkout -b <branch><SHA1_OF_COMMIT>
```
<aname="pull-wrong-branch"></a>
### I pulled from/into the wrong branch
@ -622,7 +617,6 @@ Now, let's *cherry-pick* the commit for bug #21 on top of our branch. That means
At this point, there is a possibility there might be conflicts. See the [**There were conflicts**](#merge-conflict) section in the [interactive rebasing section above](#interactive-rebase) for how to resolve conflicts.
Now let's create a new branch for bug #14, also based on master
```sh
@ -637,7 +631,6 @@ And finally, let's cherry-pick the commit for bug #14:
(14)$ git cherry-pick 5ea5173
```
<aname="delete-stale-local-branches"></a>
### I want to delete local branches that were deleted upstream
Once you merge a pull request on GitHub, it gives you the option to delete the merged branch in your fork. If you aren't planning to keep working on the branch, it's cleaner to delete the local copies of the branch so you don't end up cluttering up your working checkout with a lot of stale branches.
@ -1182,7 +1175,6 @@ Keep in mind that author and committer are not the same. The `--author` is the p
To find all commits containing a specific file you can use:
```sh
$ git log -- <pathtofile>
```
@ -1438,7 +1430,6 @@ Using `git reset` it is then possible to change master back to the commit it was
(copied and edited from [Source](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog)).
### Я хочу подготовить свои неподготовленные правки и убрать из подготовки то, что уже подготовлено
@ -456,7 +452,6 @@ $ git branch -a
$ git checkout -b <branch><SHA1_OF_COMMIT>
```
<aname="pull-wrong-branch"></a>
### Я стянул изменения (pull) из неправильной ветки или в неправильную ветку
@ -619,7 +614,6 @@ HEAD is now at a13b85e
На этом этапе есть вероятность конфликтов. О том как разрешить конфликты см. в главе [**Здесь были конфликты**](#merge-conflict) в [разделе интерактивное перебазирование выше](#interactive-rebase).
Теперь давайте создадим новую ветку для бага#14, которая также основана на master
```sh
@ -634,7 +628,6 @@ HEAD is now at a13b85e
(14)$ git cherry-pick 5ea5173
```
<aname="delete-stale-local-branches"></a>
### Я хочу удалить локальные ветки, которые были удалены в upstream
Как только Вы слили пулл-реквест на GitHub, Вам предлагают удалить слитую ветку из Вашего форка. Если Вы не планируете продолжать работу в этой ветке, то для поддержания рабочей копии в чистоте Вы можете удалить локальные копии ненужных веток, чтобы не путаться в них.
@ -1395,7 +1388,6 @@ $ git reset --hard 0254ea7
(взято из [Источник](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog)).