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

git_sparse_checkout using a branch tag #75

Open
jedwards4b opened this issue Dec 28, 2023 · 1 comment
Open

git_sparse_checkout using a branch tag #75

jedwards4b opened this issue Dec 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jedwards4b
Copy link

If I try to use a branch tag in the git_sparse_checkout script I get an error in the checkout step:
error: pathspec 'branch_tag_name' did not match any file(s) known to git

I found that if I use the branch instead of the branchtag and then add additional commands:
git -C /path/to/submodule fetch -t -depth=1
git -C /path/to/submodule checkout branchtag

It will do what I need it to do, however I think that the fetch command could be improved to get less.

@jedwards4b
Copy link
Author

This didn't work for a submodule that was referenced by hash instead of branchtag.
However I found that replacing both the additional commands with
git restore submodulename
gives what I want to happen.

@frgomes frgomes added the bug Something isn't working label Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants