im doing to sync following steps: create a branch ...
# help
u
im doing to sync following steps: create a branch add all files merge main branch
u
Hi @Mustafa Abdullah K. If I understood you correctly, you are looking for a CLI command mimicking git status? If that is the case you can simply use lakectl diff to see all the files that are uncommitted (staged)
u
Hi @Shimi Wieder. Yes you right but i integrate lakefs with python. I did not see python api for this.
u
When you say python, you mean Boto router, correct?
u
Oh ok. The doc you mentioned does include the option of diff
client.branches.diff_branch(repository='example-repo', branch='experiment-aggregations1').results
# output:
# [{'path': 'path/to/file.csv', 'path_type': 'object', 'type': 'added'}]
u
Yes i know this but this function If it's not in upload_object, it doesn't detect it as deleted.
u
I guess I need to delete the deleted ones with "delete_object" too
u
I missed the step you mentioned that you deleted the object, in that case, you need to delete it from lakefs as well since there is a reference to that object as far as lakefs is concerned.
u
A reference here is a pointer to the object location in the bucket, This reference/pointer is held by lakefs unless deleted, so deleting it from storage directly didn’t delete it as far as lakefs is concerned. The other way around is true, deleting it from lakefs with the proper command will delete it from the bucket too.
u
@Mustafa Abdullah K. did this answer your question?
u
i read what you said. Thank you very much for your answer. I just wanted to ask if there is a shortcut like "git status" 🙂
u
Not really, there is always the option to use lakectl diff, as I mentioned.