git cl checkout from Gerrit does not find the branch

348 Views Asked by At

I have few issues (tickets) submitted to Gerrit, as part of Dart project.

Since I am now moving to another laptop, I am able to create new issues, but can't checkout the ones already there.

Commands used:

C:\use\dart-sdk\sdk\> git cl checkout 212560
No branch found for issue 212560.
C:\use\dart-sdk\> git cl checkout https://dart-review.googlesource.com/c/sdk/+/212560
No branch found for issue 212560.

The CL tools documentation is here, however it doesn't mention how to checkout remote branches.

1

There are 1 best solutions below

4
On

I have not used this tool but it seems you need to drop the cl and do a regular checkout. This tool seems to be using cl in commands for pushing, fetching, syncing, committing operations only. From the doc you shared:

$ git freeze
$ git checkout fix_typo
Switched to branch 'fix_typo'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)