How to switch back to 'master' with git?

前端 未结 5 718
无人共我
无人共我 2021-01-30 02:43

I have made my first commit; then created a branch (let\'s say branch1).

In this branch I\'ve created a directory \'example\' and commited. In GitHub I see my new branch

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 03:26

    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.

提交回复
热议问题