gpt4 book ai didi

git - 如何从 Github pull 特定分支

转载 作者:太空狗 更新时间:2023-10-29 12:57:16 24 4
gpt4 key购买 nike

有这个 repo :

https://github.com/googlesamples/android-architecture

还有这个分支:

https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/

我已经克隆了项目,但我只有 master。我该怎么做才能获得这个分支?

最佳答案

如果您进行了克隆,那么您应该可以使用所有分支。您需要检查分支机构。

git checkout todo-mvvm-databinding

如果分支出于某种原因不可用,那么您可以创建它然后 pull 它:

git checkout -b todo-mvvm-databinding(-b 指定“创建分支”)

git pull origin todo-mvvm-databinding 将获取此分支并将其 merge 到您的本地分支中。

关于git - 如何从 Github pull 特定分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46367880/

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