简体   繁体   English

是否可以将git remote branch签出到基于gerrit的工作区?

[英]Is it possible to checkout git remote branch to gerrit based workspace?

I have created git local branch and pushed to remote server. 我已经创建了git local分支并将其推送到远程服务器。

    git push origin git_based_branch_test

Then I updated my current workspace with repo init/sync to update to Gerrit based repository. 然后,我使用repo init / sync更新了当前的工作空间,以更新到基于Gerrit的存储库。 All my local branches created using git commands is gone. 使用git命令创建的所有本地分支都消失了。

   repo start <git_based_branch_test>

is getting created as new branch without my earlier changes. 被创建为新分支,而没有我之前的更改。 So can help me how to pull git_based_branch_test using repo start ? 那么可以帮助我如何使用repo start拉git_based_branch_test吗?

Execute the following inside the repository and you'll create a local git_based_branch_test tracking the remote git_based_branch_test (origin/git_based_branch_test) 在存储库中执行以下操作,您将创建一个本地git_based_branch_test,以跟踪远程git_based_branch_test(origin / git_based_branch_test)

$ git fetch
$ git checkout git_based_branch_test

Branch git_based_branch_test set up to track remote branch git_based_branch_test from origin by rebasing.
Switched to a new branch 'git_based_branch_test'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM