Sign in

Update repository file

documented

Update an existing file in the repository.

PUT /projects/:id/repository/files/:file_pathProjectsno implementation yet0 runs

Input

id*
GitLab Project ID (or URL-encoded path)
12345
file_path*
URL-encoded full path to the file in the repository
path%2Fto%2Ffile.txt
branch*
Target branch name for the commit
main
content*
New file content
console.log('hello')
commit_message*
Commit message
Update file via API
encoding
Encoding of the content
text
author_email
Commit author's email (optional)
author@example.com
author_name
Commit author's name (optional)
Firstname Lastname
last_commit_id
Last known commit ID (optional)
abcdef123
execute_filemode
Execute file mode (optional boolean)
true or false
Calls GitLab as you (your API key is your account); keychains.dev holds the credentials.
Update repository file · GitLab · OpenIntegrations