美文网首页
git clone 指定子目录

git clone 指定子目录

作者: 舒克5251 | 来源:发表于2023-06-14 13:34 被阅读0次
// 1、初始化
git init
// 2、设置仓库信息,xxx为地址(比如http://xxxx/xx/x.git)
git remote add origin xxx
// 3、设置允许克隆子目录
git config core.sparsecheckout true
// 4、设置要克隆的仓库的相对根目录路径,xxx为路径(比如xxx/xx)
echo 'xxx' >> .git/info/sparse-checkout
// 5、下载具体分支代码,xxx为分支(比如dev)
git pull origin xxx

相关文章

  • gitlab

    git clone 不指定分支 git clone 指定分支

  • Git Bash使用随记

    clone 代码 git clone git@xxxxxx默认master分支 clone 指定分支代码 git ...

  • git使用笔记

    linux克隆到指定目录: git clone xxx.git “指定目录” 例子:git clone xxx.g...

  • git基础操作

    基本: 从master分支clone git clone地址 从指定分支clone git clone -b 远程...

  • github clone 指定的tag

    [github clone 指定的tag] git clone --branch [tags标签] [git地址]...

  • git 常用命令

    1、clone项目 git clone 仓库地址 直接clone指定分支git clone -b 分支名 仓库地址...

  • 快速拉取远程仓库代码

    指定分支 git clone -b + 要clone的分支名 + 仓库地址 git clone -b devel...

  • Git 的使用

    1.从远程库克隆到本地 git clone url.git clone到指定目录 Git clone url...

  • git 常用

    clone 指定分支 git clone -b 分支名 http://xxx.git 切换分支 git check...

  • GIT 常用命令

    克隆指定分支:git clone -b feature/interface ssh://git@git.sanku...

网友评论

      本文标题:git clone 指定子目录

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