Hi all, I was looking for some help using the `la...
# help
u
Hi all, I was looking for some help using the
lakectl
CLI to create a new branch. Ive checked the the docs but Im having trouble running the following command
Copy code
lakectl branch create <lakefs://demo-repo> -s <lakefs://demo-repo/upload>
Invalid branch: not a valid ref uri
Error executing command.
u
Hey @Ryan Skinner, welcome! When creating a branch, the first argument should be the new branch's URI. The
--source
(
-s
) argument is the ref from which you are creating the branch. For example, if you want to create a branch called
feature
from your
main
branch, run:
Copy code
lakectl branch create <lakefs://demo-repo/feature> -s <lakefs://demo-repo/main>
u
Ahh thank you for the clarification!
u
Sure thing, we're here if you need anything else 🙂
u
What is the difference between the
<ref uri>
and the
<branch uri>
in the documentation? https://docs.lakefs.io/reference/commands.html#lakectl-branch-create
Copy code
lakectl branch create <ref uri> [flags]
https://docs.lakefs.io/reference/commands.html#lakectl-branch-delete
Copy code
lakectl branch delete <branch uri> [flags]
is the ref uri the tag without the branch specified
<lakefs://demo-repo>
?
u
A ref is a way to refer to a commit: it can be a branch name, a tag name, or a commit ID. Ref examples:
<lakefs://demo-repo/main>
<lakefs://demo-repo/tag-name>
<lakefs://demo-repo/a1b2c3d4>
u
This concept is similar to Git.
u
For more information, see the docs.
u
That object model doc was exactly what I looking for thanks for pointing me in the right direction!
u
You're welcome! We would love to hear your feedback about the documentation, we're always looking for ways to improve
u
I think including a small example would be helpful (but that comes at the trade off of maintaining the examples and docs for you all so maybe thats not necessary for the simpler examples) . Its a little hit or miss if there's an example, the branch revert one has a concrete example but the branch create / branch delete ones don't. Another good alternative would be including a small section at the top of the doc explaining some different references like the branch uri / ref uri / etc at a high level with a link to the object model docs would be great. I know when I got stuck I searched the document to see if there other examples with the
ref uri / branch uri
to see if I could figure out what those were.
u
Thank you so much for taking the time to provide this valuable feedback! We will try to improve the docs using your suggestions.