Sync a fork branch with the upstream repository
POST
/repos/{owner}/{repo}/merge-upstream
Sync a branch of a forked repository to keep it up-to-date with the upstream repository.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” owner
required
string
The account owner of the repository. The name is not case sensitive.
repo
required
string
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ” Media type application/json
object
branch
required
The name of the branch which should be updated to match upstream.
string
Examples
Example default
{ "branch": "main"}Responses
Section titled “ Responses ”The branch has been successfully synced with the upstream repository
Media type application/json
Merged upstream
Results of a successful merge upstream request
object
message
string
merge_type
string
base_branch
string
Examples
Example default
{ "message": "Successfully fetched and fast-forwarded from upstream defunkt:main", "merge_type": "fast-forward", "base_branch": "defunkt:main"}The branch could not be synced because of a merge conflict
The branch could not be synced for some other reason