Merging tools
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.
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 = ".")
ref |
branch or commit that you want to merge |
commit |
automatically create a merge commit if the merge succeeds without
conflicts. Set this to |
squash |
omits the second parent from the commit, which make the merge a regular single-parent commit. |
repo |
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 |
target |
the branch where you want to merge into. Defaults to current |
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 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). The git_merge_analysis
is used to
test if a merge can simply be fast forwarded or not.
The git_merge_stage_only
function applies and stages changes, without
committing or fast-forwarding.
Other git:
git_archive
,
git_branch()
,
git_commit()
,
git_config()
,
git_diff()
,
git_fetch()
,
git_rebase()
,
git_remote
,
git_repo
,
git_signature()
,
git_stash
,
git_tag
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.