【问题标题】:git: Select branch when fetching specific filegit:获取特定文件时选择分支
【发布时间】:2018-11-08 06:47:18
【问题描述】:

在获取文件时可以定义一个特定的分支如下:

git archive --remote=git@my.git.server:namespace/projectname.git HEAD:path/to/file somefile.sql | tar -x

这将从默认项目分支中检索文件。

如何为上述文件检索选择一个特定分支

【问题讨论】:

    标签: git git-archive


    【解决方案1】:

    经过反复试验,当有人说有人想从develop 分支获取上述文件时,事实证明这是解决方法:

    git archive --remote=git@my.git.server:namespace/projectname.git develop:path/to/file somefile.sql | tar -x
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-04
      • 1970-01-01
      • 1970-01-01
      • 2012-11-04
      • 1970-01-01
      • 1970-01-01
      • 2023-04-10
      • 2023-01-20
      相关资源
      最近更新 更多