How to switch back to 'master' with git?

前端 未结 5 632
无人共我
无人共我 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:31

    I'm trying to sort of get my head around what's going on over there. Is there anything IN your "example" folder? Git doesn't track empty folders.

    If you branched and switched to your new branch then made a new folder and left it empty, and then did "git commit -a", you wouldn't get that new folder in the commit.

    Which means it's untracked, which means checking out a different branch wouldn't remove it.

提交回复
热议问题