-
Notifications
You must be signed in to change notification settings - Fork 277
Add ability to switch to another subrepo branch (git subrepo clone -f) without repository url. #336
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
Comments
This would be a nice feature |
Agreed. This is what bothers me right now. Very important for me, too! |
There is a little "Catch 22" with the clone command. It uses the repo to guess the subdir and we would need the subdir to find the .gitrepo file :-) As the clone command runs without knowing which subrepo to interact with.
|
Is there a plan to fix this issue in future roadmap? |
Hi. As an experiment I added |
git subrepo pull -b will already let you select a branch/commit. I change branches all the time. The pull --force feature says it behaves the way you describe, but is currently broken. I am planning to fix the --force feature unless I can be convinced otherwise. |
Thanks @admorgan for pointing it out. I didn't know subrepo pull could do the job. |
Hi @admorgan, is the --force option working? I try to change branches using the pull but I get the error. git-subrepo: Local repository does not contain 148426efe0d6b1b0c19976dcfe6e80bc59dcaf01. Try to 'git subrepo fetch module' or add the '-F' flag to always fetch the latest content. How can I change branches without cloning? Thanks! |
The documentation described how --force should work in pull, but it was not implemented. This caused subrepo to display error messages that did not work when changing branches that deviated and an ancestory could not be cleaning tracked. Fix ingydotnet#336
The documentation described how --force should work in pull, but it was not implemented. This caused subrepo to display error messages that did not work when changing branches that deviated and an ancestory could not be cleaning tracked. Fix #336
@nmunozsi For me this was caused by the fact that my subrepo branch was some commits behind master, but the updated master was already pulled into my subrepo folder. To solve this I just rebased my branch in the original repo and after that I was able to pull (even without --force) the branch into my subrepo. |
Discussed in #328
User may be allowed to switch branch (or re-clone current branch) from the subrepo repository and throw all changes in project repository. Currently man may use
git subrepo clone
command but it requires to re-type subrepo url. There should be a possibility to reclone the branch withou the need to re-type the url - at least when git clone is used with '-f' switch. So the url may be optional or there should be another way to reclone branch.The text was updated successfully, but these errors were encountered: