How to switch back to 'master' with git?

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

    For deleting the branch you have to stash the changes made on the branch or you need to commit the changes you made on the branch. Follow the below steps if you made any changes in the current branch.

    1. git stash or git commit -m "XXX"
    2. git checkout master
    3. git branch -D merchantApi

    Note: Above steps will delete the branch locally.

提交回复
热议问题