美文网首页
git 创建远程分支 | 从远程分支拉取本地不存在的分支

git 创建远程分支 | 从远程分支拉取本地不存在的分支

作者: xcyzjs | 来源:发表于2019-05-14 08:54 被阅读0次

原文

新建远程分支

git push origin remote_branch_name:local_branch_name
// remote_branch_name 是远程分支的名字
// local_branch_name 是本地分支的名字

git branch -a // 查看所有分支(远程+本地)

删除远程分支

git push origin :remote_branch_name

// 或
git push origin --delete remote_branch_name

原文

git fetch

git checkout -b local_branch_name origin/remote_branch_name

相关文章

  • 同步同事提交的git代码到本地

    git拉取远程分支文件 拉取远程分支 git fetch <远程主机名> <分支名> 取回更新并在本地创建新的分支...

  • git拉取远程分支并创建本地分支

    一、查看远程分支git branch -r 二、拉取远程分支并创建本地分支git checkout -b 本地分支...

  • Git常用操作场景

    1,拉取远程分支到本地(本地不存在的分支) git checkout -b 本地分支名 origin/远程分支名 ...

  • git 命令相关

    1,查看所有远程分支:%git branch -r 2, 拉取远程分支并创建本地分支git checkout -...

  • git 常用命令

    git 拉取远程分支到本地 git checkout -b x origin/x 拉取远程分支并同时创建对应...

  • git拉取远程分支并创建本地分支

    一、查看远程分支 Git命令查看所有远程分支: 二、拉取远程分支并创建本地分支 方法一 使用如下命令:git ch...

  • git 命令行工具

    查看本地提交 创建分支 分支推到远程分支 分支切换到 拉取远程分支,到本地,并创建新的分支 删除本地分支 删除远程...

  • git操作

    1.git pull拉取远程分支到本地 $ git pull <远程主机名> <远程分支名>:<本地分支名> 如拉...

  • Git常用命令

    拉取远程仓库分支: git fetch origin 远程分支名x:本地分支名y

  • Git 常用命令

    目的命令列出本地分支git branch列出远程分支(包括本地拉取过的被删除的远程分支)git branch -a...

网友评论

      本文标题:git 创建远程分支 | 从远程分支拉取本地不存在的分支

      本文链接:https://www.haomeiwen.com/subject/twdjaqtx.html