一、前言
同一个项目存在多个分支,假若当前所处分支为a,工作需要需要检出并切换至b分支,借助sourceTree工具进行如下操作。
1、SourceTree官网下载地址:https://www.sourcetreeapp.com/
2、SourceTree简介:Sourcetree simplifies how you interact with your Git repositories so you can focus on coding. Visualize and manage your repositories through Sourcetree's simple Git GUI.
二、步骤
1、获取:同步远程仓库与自己本地仓库代码。

2、选择要检出的上游分支,选中,点击鼠标右键,选择检出upstream/xxx

3、在弹出的检出窗口中,填写新检出的分支名称。

4、在分支列表中可以看到新检出的本地分支。双击分支,可进行不同当前分支的切换。

网友评论