Help, all the great gods. . I used git for the first time when I joined a new company. I cloned the master of the remote warehouse to the local one. Then my superior said that there was something in the branch. I didn’t know how to enter the branch, so I created a branch in the lower right corner (I clicked wrongly). Now that I have been on this branch, how can I switch back to master?
PHP中文网2017-05-24 11:33:17
Don’t look at the red color in the second picture, I already have this branch locally
PHPz2017-05-24 11:33:17
There is a Terminal tool on the toolbar at the bottom of phpstorm. Click it and enter the following command:
git branch #View current branch
When the current branch is clean, switch to master
git checkout master
Switch to dev
git checkout dev
Note: You must ensure that this branch is clean before switching. You can use git status to check it