blob: 38db2367e7d935415e86f0fa49f0d814e6851edc [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Using Git - Apache OpenNLP</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="dark light">
<meta name="description" content="Apache OpenNLP is a machine learning based toolkit for the processing of natural language text." />
<meta name="author" content="The Apache OpenNLP Team" />
<meta name="keywords" content="java, natural language processing, nlp, apache, open source, web site" />
<meta name="generator" content="JBake"/>
<!-- RSS Feed -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed.xml" />
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- The styles -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/asciidoctor.css" rel="stylesheet">
<link href="/css/prettify.css" rel="stylesheet">
<link href="/css/custom-style.css" rel="stylesheet">
<link href="/css/scheme-light.css" rel="stylesheet">
<link href="/css/scheme-dark.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body onload="prettyPrint()">
<span class="visible-lg">
<a href="https://github.com/apache/opennlp"><img style="z-index: 9999; position: absolute; top: 0; right: 0; border: 0;" src="/img/fork-me-on-github.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
</span>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-items" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img alt="Brand" src="/img/opennlp-navbar-logo.png" class="img-responsive" width="100px" style="position: relative; top: -3px;">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar-items">
<ul class="nav navbar-nav">
<li>
<a href="/"><span class="glyphicon glyphicon-home"></span> Home</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-download-alt"></span> Download <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/download.html">OpenNLP Releases</a></li>
<li><a href="/models.html">OpenNLP Models</a></li>
<li><a href="/maven-dependency.html">Maven Integration</a></li>
<li><a href="/gradle-dependency.html">Gradle Integration</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-flag"></span> General <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/news/">News</a></li>
<li><a href="https://blogsarchive.apache.org/#opennlp" target="_blank">Blog</a></li>
<li><a href="/mailing-lists.html">Mailing Lists</a></li>
<li><a href="https://issues.apache.org/jira/browse/OPENNLP" target="_blank">Issue tracker</a></li>
<li><a href="/books-tutorials-and-talks.html">Books, Tutorials and Talks</a></li>
<li><a href="/powered-by-opennlp.html">Powered by Apache OpenNLP</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-book"></span> Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/docs/">Manual and Javadocs</a></li>
<li><a href="/faq.html">FAQ</a></li>
<li><a href="https://cwiki.apache.org/OPENNLP" target="_blank">Wiki</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-console"></span> Development <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/get-involved.html">Get Involved</a></li>
<li><a href="/source-code.html">Source Code</a></li>
<li><a href="/using-git.html">Using Git</a></li>
<li><a href="/building.html">Building</a></li>
<li><a href="/code-conventions.html">Code Conventions</a></li>
<li><a href="/release.html">Release</a></li>
<li><a href="/release-model.html">Release Models</a></li>
<li><a href="/team.html">Project Team</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-leaf"></span> ASF <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="https://www.apache.org/">The Apache Software Foundation</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a href="https://www.apache.org/security/">Security</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<h1 class="title">Using Git</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>There are several ways to set up Git for committers and contributors. Contributors can safely set up Git in any way they choose, but committers should take extra care since they can push new commits to the upstream/main at Apache and various policies there make backing out mistakes problematic.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="one_time_setup">One time setup</h2>
<div class="sectionbody">
<div class="ulist">
<ul>
<li>
<p>Create a Github account or use an existing one</p>
</li>
<li>
<p>Enable 2FA for the Github account, then logout and login</p>
</li>
<li>
<p><a href="https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/" target="_blank" rel="noopener">Configure your ssh key</a></p>
</li>
<li>
<p>Enter your Github username for your Apache account under <a href="https://id.apache.org" class="bare" target="_blank" rel="noopener">https://id.apache.org</a></p>
</li>
<li>
<p>Register here <a href="https://gitbox.apache.org/setup/" class="bare" target="_blank" rel="noopener">https://gitbox.apache.org/setup/</a></p>
</li>
<li>
<p>The gitbox setup will confirm that everything is working, to confirm again check that you are listed as a member here: <a href="https://github.com/orgs/apache/teams/opennlp-committers/members" class="bare" target="_blank" rel="noopener">https://github.com/orgs/apache/teams/opennlp-committers/members</a>.</p>
</li>
<li>
<p>Fork the OpenNLP repositories:</p>
<div class="ulist">
<ul>
<li>
<p><a href="https://github.com/apache/opennlp-sandbox" class="bare" target="_blank" rel="noopener">https://github.com/apache/opennlp-sandbox</a></p>
</li>
<li>
<p><a href="https://github.com/apache/opennlp-addons" class="bare" target="_blank" rel="noopener">https://github.com/apache/opennlp-addons</a></p>
</li>
<li>
<p><a href="https://github.com/apache/opennlp-site" class="bare" target="_blank" rel="noopener">https://github.com/apache/opennlp-site</a></p>
</li>
<li>
<p><a href="https://github.com/apache/opennlp" class="bare" target="_blank" rel="noopener">https://github.com/apache/opennlp</a></p>
</li>
</ul>
</div>
</li>
<li>
<p>Configure your <a href="https://help.github.com/articles/setting-your-email-in-git/" target="_blank" rel="noopener">user name and Apache e-mail in git</a></p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuring_the_upstream_remote">Configuring the upstream remote</h2>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
<pre>git remote add upstream git@github.com:apache/opennlp.git</pre>
</div>
</div>
<div class="paragraph">
<p>The last part of the upstream remote url must match the repository name.</p>
</div>
<div class="paragraph">
<p>Your repository should have two remotes, the upstream remote, and the default origin remote which is pointing to your forked version of the repository.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="merge_a_pull_request_via_github">Merge a Pull Request via GitHub</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Please do not commit directly to the main branch. All changes are done via Pull Requests, and a Pull Request needs to get two positive reviews and no change requests until it <a href="https://git-scm.com/docs/git-merge#_fast_forward_merge" target="_blank" rel="noopener">can be merged</a>. The PR can be merged via the Github UI as described below or manually. Please also note that we do not use merge commits, the merge should be done using <a href="https://git-scm.com/docs/git-merge#_fast_forward_merge" target="_blank" rel="noopener">fast forward merging</a>.</p>
</div>
<div class="paragraph">
<p>To merge a PR via Github follow these steps:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Wait for two positive reviews</p>
</li>
<li>
<p>Ensure the merge button is green (Travis CI build must have passed)</p>
</li>
<li>
<p>Select the option &ldquo;Rebase and merge&rdquo;, &ldquo;Squash and merge&rdquo; should only be used if the contributor is not providing a single squashed commit</p>
</li>
<li>
<p>Click on the merge button</p>
</li>
<li>
<p>Confirm the merge</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="reject_a_pull_request">Reject a Pull Request</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Close the PR on GitHub and leave a comment why it was rejected.</p>
</div>
</div>
</div>
</div>
<footer class='footer'>
<div class="container">
<p class="text-muted">Copyright &copy; 2024 The Apache Software Foundation, Licensed under the
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> <br>
Apache OpenNLP, OpenNLP, Apache, the Apache feather logo, and the Apache OpenNLP project logo are
trademarks of The Apache Software Foundation. -
<a href="/privacy-policy.html">Privacy Policy</a></p>
</div>
</footer>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://www.apachecon.com/event-images/snippet.js"></script>
<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/prettify.js"></script>
<script type="text/javascript">
var link = $('a[href="' + this.location.pathname + '"]');
if (link != undefined)
link.parents('li,ul').addClass('active');
</script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '33']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</body>
</html>