← #76 Run the last command as the root user

Checkout the previous branch

Topics: Git

It's common that we have multiple branches in the same Git repository. Each branch is used to fix a given bug, or implements a new feature.

Switching between branches is one of popular tasks in our daily work:

$ git checkout <target-branch-name>

Without specifying the branch name, we can quickly checkout the previous branch with the following command:

$ git checkout -
Fix a typo or suggest an improvement
#78 Replace multiple if statements with a lookup table