[Questions] After git creates a branch, the idea switch branch cannot be found and the merge problem

        After the local idea is bound to the git warehouse, after creating a new branch on the git warehouse line, I want to switch branches in the local idea and find that there is no new branch, resulting in the inability to switch branches and code merge. as follows:

        At this time, you only need to git pull to pull once. You can use the git bash here terminal to execute git pull, or you can directly click pull to pull the idea.

        Look at switching git branches again, and find that you can switch to the newly created branch.

        Click dev, click checkOut.

        Found that it has switched to the newly created branch.

        At this time, if you want to submit the code to the master/main main branch after submitting the code to dev, then switch to the master/main branch after the code is pushed to the dev branch, and then select the branch data source you want to merge (dev ), click merge into current, merge the code into the current branch (master/main), and submit the code of the dev branch to the master/main branch. as follows:

        Simulate the code to modify the dev branch:

        Perform pull, add, commit, push operations.

        After the commit is complete, switch to the master/main branch.

        Then click master/main, select the dev branch, and click merge into current to merge the different codes of the dev branch into the current branch.

 

        Click push and find that you can continue to submit the code modified by the dev branch just now on the current master/main branch.

Supongo que te gusta

Origin blog.csdn.net/weixin_56995925/article/details/125572963
Recomendado
Clasificación