You need to checkout the branch:
git checkout master
or
git checkout main
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.