gpt4 book ai didi

git - hg heads/hg parents 的 git 等价物是什么?

转载 作者:IT王子 更新时间:2023-10-29 00:54:00 27 4
gpt4 key购买 nike

在 hg 中,我可以使用 hg heads 查看所有当前的头像。我仍然无法在 git 中找到等效项。 git-hg rosetta stone没有给出答案。

至于 hg parents,它在 hg 中简单地告诉节点的直接祖先,rosetta stone 简单地读取非常无用:

git log # you can read all the information you need from there (as long as you already know the answer to the question you're asking) 

最佳答案

git rev-list HEAD , git rev-list <sha1>git rev-list HEAD -1 -- filehg parents 的不同形式的等价物

至于你的分离头问题,做git checkout <sha1>用于提交检查而不是用于一般工作流程。如果你想要一个提交的分支,你必须做 git branch <name> <sha1>git checkout -b <name> <sha1>并致力于此。

由于以上原因,我觉得说等价于hg heads并不理想。在 git 中,所有提交都没有子项,但关闭等效项是 git branch

关于git - hg heads/hg parents 的 git 等价物是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9473456/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com