Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
85bfd2b0
Commit
85bfd2b0
authored
Apr 01, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
8d3b05ea
e08c693b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
doc/api/commits.md
doc/api/commits.md
+26
-0
No files found.
doc/api/commits.md
View file @
85bfd2b0
...
...
@@ -155,6 +155,32 @@ Example response:
}
```
GitLab supports
[
form encoding
](
../README.md#encoding-api-parameters-of-array-and-hash-types
)
. The following is an example using Commit API with form encoding:
```
bash
curl
--request
POST
\
--form
"branch=master"
\
--form
"commit_message=some commit message"
\
--form
"start_branch=master"
\
--form
"actions[][action]=create"
\
--form
"actions[][file_path]=foo/bar"
\
--form
"actions[][content]=</path/to/local.file"
\
--form
"actions[][action]=delete"
\
--form
"actions[][file_path]=foo/bar2"
\
--form
"actions[][action]=move"
\
--form
"actions[][file_path]=foo/bar3"
\
--form
"actions[][previous_path]=foo/bar4"
\
--form
"actions[][content]=</path/to/local1.file"
\
--form
"actions[][action]=update"
\
--form
"actions[][file_path]=foo/bar5"
\
--form
"actions[][content]=</path/to/local2.file"
\
--form
"actions[][action]=chmod"
\
--form
"actions[][file_path]=foo/bar5"
\
--form
"actions[][execute_filemode]=true"
\
--header
"PRIVATE-TOKEN: <your_access_token>"
\
"https://gitlab.example.com/api/v4/projects/1/repository/commits"
```
## Get a single commit
Get a specific commit identified by the commit hash or name of a branch or tag.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment