Moving section

This commit is contained in:
NRKirby 2018-01-07 15:41:59 +00:00
parent 27356775d6
commit 0e3e40fd13
1 changed files with 10 additions and 10 deletions

View File

@ -428,16 +428,6 @@ When you want to get rid of all of your untracked files
$ git clean -f
```
### I made changes on the wrong branch
You've made uncommitted changes and realise you're on the wrong branch. Stash changes and apply them to the branch you want:
```sh
(wrong_branch)$ git stash
(wrong_branch)$ git checkout <correct_branch>
(correct_branch)$ git stash apply
```
## Branches
<a name="i-want-to-list-all-branches"></a>
### I want to list all branches
@ -850,6 +840,16 @@ $ git remote set-head origin --auto
origin/HEAD set to master
```
### I made changes on the wrong branch
You've made uncommitted changes and realise you're on the wrong branch. Stash changes and apply them to the branch you want:
```sh
(wrong_branch)$ git stash
(wrong_branch)$ git checkout <correct_branch>
(correct_branch)$ git stash apply
```
## Rebasing and Merging
<a name="undo-rebase"></a>