Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support branch for cm pull repo #1244

Open
arjunsuresh opened this issue May 3, 2024 · 0 comments
Open

Support branch for cm pull repo #1244

arjunsuresh opened this issue May 3, 2024 · 0 comments

Comments

@arjunsuresh
Copy link
Contributor

Currently the behaviour of --branch with cm pull repo command is not as expected. Instead of cloning from the given branch, cm is currently cloning from the default branch

arjunsuresh@Arjuns-MacBook-Pro ~ % cm pull repo mlcommons@cm4mlops --branch=mlperf-inference
=======================================================
Alias:    mlcommons@cm4mlops
URL:      https://github.com/mlcommons/cm4mlops
Branch:   mlperf-inference
Checkout:

Local path: /Users/arjunsuresh/CM/repos/mlcommons@cm4mlops

git clone https://github.com/mlcommons/cm4mlops mlcommons@cm4mlops

Cloning into 'mlcommons@cm4mlops'...
remote: Enumerating objects: 63643, done.
remote: Counting objects: 100% (12668/12668), done.
remote: Compressing objects: 100% (1123/1123), done.
remote: Total 63643 (delta 11708), reused 11575 (delta 11545), pack-reused 50975
Receiving objects: 100% (63643/63643), 27.32 MiB | 20.75 MiB/s, done.
Resolving deltas: 100% (45475/45475), done.

git checkout -b mlperf-inference

Switched to a new branch 'mlperf-inference'

CM alias for this repository: mlcommons@cm4mlops

Reindexing all CM artifacts. Can take some time ...
Took 0.6 sec.

Now,

cd $HOME/CM/repos/mlcommons@cm4mlops
git log

gives

commit d5fcf382064bad45acb63ca7201171d384942541 (HEAD -> mlperf-inference, origin/main, origin/HEAD, main)

Also, repeating the command throws an error.

arjunsuresh@Arjuns-MacBook-Pro mlcommons@cm4mlops % cm pull repo mlcommons@cm4mlops --branch=mlperf-inference
=======================================================
Alias:    mlcommons@cm4mlops
URL:      https://github.com/mlcommons/cm4mlops
Branch:   mlperf-inference
Checkout:

Local path: /Users/arjunsuresh/CM/repos/mlcommons@cm4mlops

git pull

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> mlperf-inference


git checkout -b mlperf-inference

fatal: a branch named 'mlperf-inference' already exists

CM error: git checkout for repository failed!
arjunsuresh added a commit that referenced this issue May 7, 2024
Fix "--branch" for cm pull repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant