git checkout -b newbranch_name --track origin/feature/newbranch_name

如果遇到类似:

fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/remote-name' which can not be resolved as commit?
的问题
可使用一下命令:
git remote show origin
git remote update
git fetch
然后再使用:
git checkout -b local-name origin/remote-name
命令即可。
参考资料:Git checkout on a remote branch does not work

git 拉取远程分之到本地的更多相关文章

  1. git拉取远程分支到本地

    git拉取远程分支到本地 一.查看远程分支 -- 查看远程分支 git branch -r 二.拉取远程分支并创建本地分支 -- 采用此种方法建立的本地分支会和远程分支建立映射关系. git chec ...

  2. git 拉取远程分支到本地并建立关联关系

    git拉取远程分支到本地   一.查看远程分支 使用如下git命令查看所有远程分支: git branch -r   二.拉取远程分支并创建本地分支 方法一 使用如下命令: git checkout ...

  3. git 拉取远程分支到本地

    步骤: 1.新建一个空文件,文件名为hhhh 2.初始化 git init 3.自己要与origin master建立连接(下划线为远程仓库链接) git remote add origin git@ ...

  4. git拉取远程分支到本地分支或者创建本地新分支

    git fetch origin branchname:branchname 可以把远程某各分支拉去到本地的branchname下,如果没有branchname,则会在本地新建branchname g ...

  5. 拉取远程仓库到本地错误The authenticity of host 'github.com (13.229.188.59)' can't be established.

    1.个人在github上面创建了仓库,通过本地的git拉取远程仓库到本地报错信息如下: 这是因为Git使用SSH连接,而SSH第一次连接需要验证GitHub服务器的Key.确认GitHub的Key的指 ...

  6. git拉取远程分支并创建本地分支和Git中从远程的分支获取最新的版本到本地

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

  7. git 拉取远程代码

    git 拉取远程代码 || 利用vscode编辑器自带了git,可在ctrl+~打开控制台拉取代码,非常好用哦~在实际项目开发过程中,往往是已经存在远程项目了,我们定义的需求是只需要简单的操作git, ...

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

    本地分支推送至远程 git checkout local_branch git push origin local_branch:remote_branch 一.查看远程分支 使用如下Git命令查看所 ...

  9. git拉取远程分支

    查看本地所有分支列表: git branch -a 查看远程所有分支列表: git branch -r 拉取远程分支(使用该方式会在本地新建分支x,但是不会自动切换到该本地分支x,需要手动checko ...

随机推荐

  1. Mysql基本类型(五种年日期时间类型)——mysql之二

    转自:<MySQL技术内幕:时间和日期数据类型> http://tech.it168.com/a2012/0904/1393/000001393605_all.shtml

  2. I2C串行总线标准驱动程序(C51)-万能程序

    #include "reg51.h" #include "intrins.h" unsigned char SystemError; sbit SCL= P1^ ...

  3. 学习 ExtJS 4 面板与布局

    原文 http://www.cnblogs.com/codealone/archive/2013/06/04/3091325.html 面板Panel Ext.panel.Panel拓展自Ext.co ...

  4. grok 正则也支持常规正则

    2016-08-29 17:40:01,19 INFO com.zjzc.common.utils.HttpUtil - 请求接口: https://www.zjcap.cn/pay/interfac ...

  5. mac安装GNU命令行工具

    mac安装GNU命令行工具 2.添加的repo     tap home/dupes        brew install coreutils  binutils  diffutils  ed -- ...

  6. C语言随笔_return答疑

    1. 例子,看实例2-2.这道题有同学会问,那个return有什么用?这么讲吧,return是个英文单词,中文意思是“返回”,用在程序里也是返回的意思,返回啥呢?返回一个值.在func函数中,retu ...

  7. Windows Azure功能更新:Oracle软件正式登陆Azure了

    今天,Windows Azure国际版发布了新的功能:全面支持Oracle软件,包括Oracle Linux, Oracle 12c数据库,Weblogic 11g和12c,Oracle JDK 6和 ...

  8. hdu 2438 Turn the corner(几何+三分)

    Problem Description Mr. West bought a new car! So he is travelling around the city. One day he comes ...

  9. 单调队列-hdu-3415-Max Sum of Max-K-sub-sequence

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3415 题目大意: 给n个数凑成环状,求某一区间,使得该区间长度不超过k,且总和最大. 解题思路: 区 ...

  10. Android应用程序组件Content Provider在应用程序之间共享数据的原理分析

    文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6967204 在Android系统中,不同的应用 ...