2

It is possible to add (commit) a new file to a Git repository in a browser according to GitHub documentation.

I want to do the same in my Java application.

Where can I find GitHub API documentation for the API call that is being used here?

Here are the request data I found using Firefox:

Screenshot

Screenshot

Glory to Russia
  • 15,153
  • 48
  • 169
  • 304

1 Answers1

0

For creating or updating file contents in a GitHub repo, you can use the below GitHub v3 API

PUT /repos/{owner}/{repo}/contents/{path}

The documentation of the above API can be found here.

Madhu Bhat
  • 11,063
  • 1
  • 29
  • 49