After doing any of these three things you should be able to check out the branch you want without any issues.
After doing any of these three things you should be able to check out the branch you want without any issues.
``` console
``` console
$git checkout <branch>
user@host:~/repo/blocks$git checkout <branch>
```
```
**BONUS:** Let's assume you were in case 3 and you stashed the changes, then checked out a working branch. Now you want to switch back to master and get back the changes you made. Here's what you do:
**BONUS:** Let's assume you were in case 3 and you stashed the changes, then checked out a working branch. Now you want to switch back to master and get back the changes you made. Here's what you do:
``` console
``` console
$git checkout master
user@host:~/repo/blocks$git checkout master
$git stash pop
user@host:~/repo/blocks$git stash pop
```
```
For more information, see Git's official documentation for the stash command:
For more information, see Git's official documentation for the stash command: