EVOLUTION-MANAGER
Edit File: git_merge.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Merging tools</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for git_merge {gert}"><tr><td>git_merge {gert}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Merging tools</h2> <h3>Description</h3> <p>Use <code>git_merge</code> 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. </p> <h3>Usage</h3> <pre> 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 = ".") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>ref</code></td> <td> <p>branch or commit that you want to merge</p> </td></tr> <tr valign="top"><td><code>commit</code></td> <td> <p>automatically create a merge commit if the merge succeeds without conflicts. Set this to <code>FALSE</code> if you want to customize your commit message/author.</p> </td></tr> <tr valign="top"><td><code>squash</code></td> <td> <p>omits the second parent from the commit, which make the merge a regular single-parent commit.</p> </td></tr> <tr valign="top"><td><code>repo</code></td> <td> <p>The path to the git repository. If the directory is not a repository, parent directories are considered (see <a href="git_repo.html">git_find</a>). To disable this search, provide the filepath protected with <code><a href="../../base/html/AsIs.html">I()</a></code>. When using this parameter, always explicitly call by name (i.e. <code style="white-space: pre;">repo = </code>) because future versions of gert may have additional parameters.</p> </td></tr> <tr valign="top"><td><code>target</code></td> <td> <p>the branch where you want to merge into. Defaults to current <code>HEAD</code>.</p> </td></tr> </table> <h3>Details</h3> <p>By default <code>git_merge</code> automatically commits the merge commit upon success. However if the merge fails with merge-conflicts, or if <code>commit</code> is set to <code>FALSE</code>, the changes are staged and the repository is put in merging state, and you have to manually run <code>git_commit</code> or <code>git_merge_abort</code> to proceed. </p> <p>Other functions are more low-level tools that are used by <code>git_merge</code>. <code>git_merge_find_base</code> looks up the commit where two branches have diverged (i.e. the youngest common ancestor). The <code>git_merge_analysis</code> is used to test if a merge can simply be fast forwarded or not. </p> <p>The <code>git_merge_stage_only</code> function applies and stages changes, without committing or fast-forwarding. </p> <h3>See Also</h3> <p>Other git: <code><a href="git_archive.html">git_archive</a></code>, <code><a href="git_branch.html">git_branch</a>()</code>, <code><a href="git_commit.html">git_commit</a>()</code>, <code><a href="git_config.html">git_config</a>()</code>, <code><a href="git_diff.html">git_diff</a>()</code>, <code><a href="git_fetch.html">git_fetch</a>()</code>, <code><a href="git_rebase.html">git_rebase</a>()</code>, <code><a href="git_remote.html">git_remote</a></code>, <code><a href="git_repo.html">git_repo</a></code>, <code><a href="git_signature.html">git_signature</a>()</code>, <code><a href="git_stash.html">git_stash</a></code>, <code><a href="git_tag.html">git_tag</a></code> </p> <hr /><div style="text-align: center;">[Package <em>gert</em> version 1.9.1 <a href="00Index.html">Index</a>]</div> </body></html>