How to switch back to ‘master’ with git?

You need to checkout the branch:

git checkout master

See the Git cheat sheets for more information.

Edit: Please note that git does not manage empty directories, so you’ll have to manage them yourself. If your directory is empty, just remove it directly

Leave a Comment