Hi there,
Iam curious if its possible to clone a repository via the REST API as I haven't found anything yet. If thats not possible, I would like to ask if its possible to retrieve just the .git folder from a repository.
Many thanks in advance!
Regards Lars
Hello @Lars Schweikardt,
Welcome to the Community.
I'm not entirely sure what did you mean by REST API here. You can clone a repository over HTTPS using same credentials as Bitbucket REST API (even using OAuth token, for instance), but it won't actually be REST, as it is defined.
The .git directory is the entire repository (it contains all objects, refs, etc.), so it is exactly the same as cloning a repo. You probably meant clone bare repo without checking out working directory? This is a client-side operation, i.e. Git first fetches the whole repo, then it can create a working directory for you. See Git clone documentation for details.
If you describe what you're actually trying to achieve, I might come up with other hints.
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.