libgit2

git_rebase_init

Version:

Initializes a rebase operation to rebase the changes in branch relative to upstream onto another branch. To begin the rebase process, call git_rebase_next. When you have finished with this object, call git_rebase_free.

Signature

int git_rebase_init(git_rebase **out, git_repository *repo, const git_annotated_commit *branch, const git_annotated_commit *upstream, const git_annotated_commit *onto, const git_signature *signature, const git_rebase_options *opts);

Parameters

In
out

Pointer to store the rebase object

In
repo

The repository to perform the rebase

In
branch

The terminal commit to rebase

In
upstream

The commit to begin rebasing from, or NULL to rebase all reachable commits

In
onto

The branch to rebase onto, or NULL to rebase onto the given upstream

In
signature

The signature of the rebaser (optional)

In
opts

Options to specify how rebase is performed

Returns

int

Zero on success; -1 on failure.

Versions