Open wobeng opened 4 years ago
The git-remote helper should only replace the value of your remote-repo. If you clone with the git-remote-helper, you will still get all of the branches.
Assuming you've set up all the git-remote-helper correctly with the right profile you can try the two commands below.
To specify the branch you want to checkout after the clone try this command.
git clone --branch <branch-name> codecommit://<profile>@<repository-name>
To only check out a single branch try this command.
git clone --single-branch --branch <branch-name> develop codecommit://<profile>@<repository-name>
I hit this too, needs a doc update.
Usually you can clone origin/main by not specifying a branch name e.g.
git clone codecommit::<region>://<profile>@<repository-name>
then run:
git fetch --all
then see all branches with:
git branch -r
This doesn't seem to work with git-remote-codecommit.
Checking out branches directly via the command you mention does seem to work:
git clone --branch <branch-name> codecommit://<profile>@<repository-name>
how do I specify the branch to clone?
I can usually do git+ssh://mycompany/v1/repos/my-repo@develop