You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Azure DevOps或VS Code命令行复制指定非默认分支为新分支

在原仓库内从指定分支创建新分支的两种实现方式

一、Azure DevOps 网页端操作

  • 打开你的Azure DevOps仓库,切换到分支页面(左侧导航栏的"Branches")
  • 在分支列表中找到Predictive_Frame_Animals分支,点击其右侧的更多选项按钮(三个点)
  • 选择"Create branch"选项
  • 在弹出窗口中,输入新分支名称Predictive_Frame_Lions,确认基础分支为Predictive_Frame_Animals
  • 点击"Create"完成创建

二、VS Code 命令行操作

打开VS Code终端(快捷键:Ctrl+`),依次执行以下命令:

  1. 拉取远程的目标分支到本地:
    git fetch origin Predictive_Frame_Animals
    
  2. 基于该分支创建并切换到新分支:
    git checkout -b Predictive_Frame_Lions origin/Predictive_Frame_Animals
    
  3. 将新分支推送到远程仓库:
    git push -u origin Predictive_Frame_Lions
    

内容的提问来源于stack exchange,提问作者PV8

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 23:42:48