Hello! I have a question, in the method (POST /repositories/{repository}/branches/{branch}/commits) it is indicated that changes are committed throughout the selected branch, perhaps there are options for an analogue of the git add <fileName> command? We have an urgent need to add sample files to the commit. Perhaps someone had experience solving this problem?
o
Offir Cohen
07/16/2024, 11:43 AM
Hey Boris, welcome to the lake lakefs
You can import files into lakeFS. Is this the functionality you are looking for?
б
Борис Стук
07/16/2024, 12:05 PM
Yes, I know about this feature, but I meant using the lakefs API. That is, it is necessary to leave files in the uncommited area, but at the same time call the POST/repositories/{repository}/branches/{branch}/commits method
Борис Стук
07/16/2024, 12:07 PM
That is, to add to the commit only those files that I need from the uncommitted area
o
Offir Cohen
07/16/2024, 12:38 PM
Thanks for the clarification. I'm checking
Offir Cohen
07/16/2024, 3:32 PM
Hi Boris
There is an open feature request for this. Please feel free to comment your use case there
Offir Cohen
07/16/2024, 7:14 PM
HI Boris
A suggested workaround is to use stageObject to zero-copy the objects off to another branch, then delete them from the branch and commit only the desired objects. Following this you can merge that other branch into the desired branch
This is not a common practice and will not work with GC, but it will probably achieve your requested feature, until the thread mentioned before is implemented
e
einat.orr
07/17/2024, 2:48 PM
@Борис Стук Is the above workaround applicable to your use case?