git checkout 指令
时间: 2023-08-25 17:15:40 浏览: 101
git 常用指令常用指令常用指令
引用中提到,git checkout是用于切换分支的指令,在实现分支切换功能时,与git switch几乎完全相同。可以使用git checkout加上分支名称来切换到指定分支,如git checkout demo6可以切换到demo6分支。使用git checkout -b加上分支名称可以新建并直接切换到一个新分支,效果与git switch -c相同。所以,git checkout在切换分支方面与git switch功能类似。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [git switch 与 git checkout的不同](https://blog.csdn.net/iceboy314159/article/details/121375881)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Git checkout 指令总结:切换本地和远程分支、查看本地与远程分支关系](https://blog.csdn.net/zhouzhiwengang/article/details/124445493)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文