捆绑标签和头部 [英] git bundle: bundle tags and heads
问题描述
我认为git bundle是这项工作的最佳工具。当我在机器A上完成工作并在机器B上解除捆绑时,我简单地捆绑了我的回购。这给我留下了这样的问题:
是否可以嵌入有关标签的信息并在捆绑分支?特别是,我该如何捆绑标签对象?
编辑:除了注释之外 - 我想尽可能保持这个工作流程自动化。我不想把这个软件包当作远程软件。而不是那个,我想将这个包复制到我的仓库中 - 这就是添加提交和标记,快速转发现有分支并在分支不存在的情况下添加新的分支。
git bundle create RA.bundle --branches --tags
会包含有关所有标签和所有分支的信息。
git bundle
接受参数列表,git rev-parse
和git rev-list
(并且包含一个名为ref的参见指定引用),它指定了特定的对象和引用传输。
- branches [=< pattern>]
假设
refs / heads
中的所有参数都在命令行中列为< commit>
。 >
如果给出< pattern>
,则限制麸皮如果模式缺少?
,,
或[
,/
在结尾处隐含。
- tags [=< pattern>]
假设所有refs / tags中的ref在命令行中都被列为
< commit>
。
如果给出< pattern>
,将标签限制为与给定shell glob相匹配的标签。
如果pattern缺少? ,
,
或[,/
在结尾处隐含。
I develop on several machines. I want to have a repository for each of my projects on each development machine, and I would like to keep them in sync without using a remote repository I can push to. (For now I cannot afford a dedicated machine for that purpose).
I think git bundle is the right tool for the job. I simply bundle my repo when I am done working on machine A, and unbundle on machine B. This leaves me with this questions:
Is it possible to embed information about tags and branches in the bundle? In particular, how can I bundle tag objects?
EDIT: Just a note aside - I want to keep this workflow as automated as possible. I do not want to treat the bundle as a remote. Rather than that, I would like to duplicate the bundle into my repository - that is add commits and tags, fast-forward existing branches and add new branches if the branch does not exist.
git bundle create RA.bundle --branches --tags
would include informations about all tags and all branches.
git bundle
takes a list of arguments, acceptable togit rev-parse
andgit rev-list
(and containing a named ref, see SPECIFYING REFERENCES), that specifies the specific objects and references to transport.
--branches[=<pattern>]
Pretend as if all the refs in
refs/heads
are listed on the command line as<commit>
.
If<pattern>
is given, limit branches to ones matching given shell glob.
If pattern lacks?
,,
or[
,/
at the end is implied.
--tags[=<pattern>]
Pretend as if all the refs in refs/tags are listed on the command line as
<commit>
.
If<pattern>
is given, limit tags to ones matching given shell glob.
If pattern lacks?
,,
or[, /
at the end is implied.
这篇关于捆绑标签和头部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!