How to download just some files from gitlab repo
How do I download my whole repository from GitLab? Ask Question. Asked 3 years, 7 months ago. Active 3 years, 7 months ago. Viewed 80k times. There doesn't seem to be a "forum" as such for GitLab, hence my posting here.
Improve this question. Every clone is the repository or some subset of branches. That's the point of DVCSes. IgnacioVazquez-Abrams No, it is missing lost branches etc. Add a comment. Active Oldest Votes. Use git clone. This option was added together with an update to the remote protocol, and it truly prevents objects from being downloaded from the server.
The sparse-checkout part is also needed unfortunately. You can also only download certain files with the much more understandable:. Then, the git sparse-checkout set command fetches only the missing blobs files from the server:. But on my test that fails with:. I think this command is meant to manage a settings file that says "I only care about these subtrees" so that future commands will only affect those subtrees.
But it is a bit hard to be sure because the current documentation is a bit If this understanding is correct, then this would be a good complement to git clone --filter described above, as it would prevent unintentional fetching of more objects if you intend to do git operations in the partial cloned repo.
So yeah, it's just too hard to be certain at the moment, thanks in part to the joys of GitHub being closed source. But let's keep an eye on it. This was added in Git 2. Edit: on Git 2. TODO introduced in which version? GitHub upstream.
If you remove --depth 1 , then they show on the list of missing files. Imagine having all the code base of your enterprise in a single repo without ugly third-party tools like repo. Imagine storing huge blobs directly in the repo without any ugly third party extensions. There are some workaround solutions to be able to get a single file out of a git archive, listed on a Stack Exchange answer for the same question , but you will still have to download the entire repository to get that single file or directory you want.
Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to clone only some directories from a git repository?
Ask Question. Asked 7 years, 6 months ago. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Learn more about Collectives on Stack Overflow. The Overflow Blog. Podcast Who is building clouds for the independent developer? Exploding turkeys and how not to thaw your frozen bird: Top turkey questions Featured on Meta.
Now live: A fully responsive profile. Reducing the weight of our footer. Downloading single files would also take a lot of time because I need to right-click on "Raw" - button of every file. I already had a look into issue closed and am disappointed that you say it's not "feasible with the current architecture". Is it really so difficult to implement? I think audience would be given by "bigger" repositories.
Thanks in advance for support, Best regards, Daniel.
0コメント