Use git_merge() to merge a branch into the current head. Based on how the branches
have diverged, the function will select a fast-forward or merge-commit strategy.
Other functions are more low-level tools that are used by git_merge():
git_merge_find_base() looks up the commit where two branches have diverged
(i.e. the youngest common ancestor).
git_merge_analysis() is used to
test if a merge can simply be fast forwarded or not.
git_merge_stage_only() applies and stages changes, without committing or fast-forwarding.
git_conflicts() lists merge conflicts.
git_merge(ref, commit = TRUE, squash = FALSE, repo = ".")git_merge_stage_only(ref, squash = FALSE, repo = ".")
git_merge_find_base(ref, target = "HEAD", repo = ".")
git_merge_analysis(ref, repo = ".")
git_merge_abort(repo = ".")
git_commit_descendant_of(ancestor, ref = "HEAD", repo = ".")
git_conflicts(repo = ".")
branch or commit that you want to merge
automatically create a merge commit if the merge succeeds without
conflicts. Set this to FALSE if you want to customize your commit message/author.
omits the second parent from the commit, which make the merge a regular single-parent commit.
The path to the git repository. If the directory is not a
repository, parent directories are considered (see git_find()). To disable
this search, provide the filepath protected with I(). When using this
parameter, always explicitly call by name (i.e. repo = ) because future
versions of gert may have additional parameters.
the branch where you want to merge into. Defaults to current HEAD.
a reference to a potential ancestor commit
By default git_merge() automatically commits the merge commit upon success.
However if the merge fails with merge-conflicts, or if commit is set to
FALSE, the changes are staged and the repository is put in merging state,
and you have to manually run git_commit() or git_merge_abort() to proceed.
Other git:
git_archive,
git_branch(),
git_commit(),
git_config(),
git_diff(),
git_fetch(),
git_history,
git_ignore,
git_rebase(),
git_remote,
git_repo,
git_reset(),
git_restore(),
git_revert(),
git_signature(),
git_stash,
git_tag,
git_worktree