I was intrigued and bit confused with your reply until I checked the link you provided and others that I found from additional searching about “bare repository”.
Perhaps, if I outline the workflow that I envision, you might be able to give me pointers on how to better use the GitLab API.
I have several jpg files that I want to version. This collection of files may change from time to time, like adding more files, deleting some and even changing the content of some. I want to commit and push each version of this collection to GitLab every time such changes occur. I then would want to pull any version of the collection from GitLab at any time.
So I have a local folder named “C:\MyFiles” with a number of subdirectories like “C:\MyFiles\One”, “C:\MyFiles\Two”, etc.
And here’s what I think I should do:
- Create a new GitLab project using the GitLab web ui (which from what I have read will default to a bare repo).
- Push all the files from C:\MyFiles using the api: POST /projects/:id/repository/commits
- Tag the last commit using the api: POST /projects/:id/repository/tags
- To pull all the files from any desired tag with this api: GET /projects/:id/repository/archive
The reason why I asked about git status was to determine what commit action I will use (that is, create, update or delete) for succeeding calls to “POST /projects/:id/repository/commits”.
Perhaps you can give some pointers.