I am trying to transfer files using the GitHub API by curl. The files may have any extension (eg: .java, .jar, .jpg, etc). I have found no solutions in the net. Is there a way I can do this? Or is it even possible?
What do you mean by transfer file?
there is an option of uploading a blob files through the github api /repos/git/blobs
.
you should add a parameter of the content of the file in base64
format.
if you want to use them later on you can create new tree
with the returned SHA
.
base64 online converter: https://www.base64decode.org/