blob: 51356be0ea1d1eddafd6cbca767ab59fdedc93c0 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Submitting patches / Apache Celix</title>
<link rel="icon" href="/assets/img/favicon.ico">
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '9']);
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>
</head>
<body class="light-grey">
<a href="https://github.com/apache/celix" class="github-ribbon">
<img src="/assets/img/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
</a>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
<div class="container">
<a class="navbar-brand" href="/">
<img src="/assets/img/celix-white.svg" height="40" class="d-inline-block align-top" alt="Celix Logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/download.cgi">Download</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddDocs" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Docs
</a>
<div class="dropdown-menu" aria-labelledby="ddDocs">
<a class="dropdown-item" href="/docs/2.4.0/docs.html">2.4.0 (latest)</a>
<a class="dropdown-item" href="/docs/2.3.0/docs.html">2.3.0</a>
<a class="dropdown-item" href="/docs/2.2.1/docs.html">2.2.1</a>
<a class="dropdown-item" href="/docs/2.1.0/docs.html">2.1.0</a>
</div>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="ddContributing" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Contributing
</a>
<div class="dropdown-menu" aria-labelledby="ddContributing">
<a class="dropdown-item" href="/contributing/youatcelix.html">You at Celix</a>
<a class="dropdown-item" href="/contributing/submitting-patches.html">Submitting patches</a>
<a class="dropdown-item" href="/contributing/source-and-builds.html">Source code and builds</a>
<hr>
<a class="dropdown-item" href="/contributing/releasing.html">Releasing</a>
<a class="dropdown-item" href="/contributing/volunteers.html">Volunteers</a>
<a class="dropdown-item" href="https://whimsy.apache.org/board/minutes/Celix.html">Board Reports</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddSupport" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Support
</a>
<div class="dropdown-menu" aria-labelledby="ddSupport">
<a class="dropdown-item" href="/support/mailing-list.html">Mailing Lists</a>
<a class="dropdown-item" href="/support/issue-tracking.html">Issue Tracking</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddFoundation" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
ASF
</a>
<div class="dropdown-menu" aria-labelledby="ddFoundation">
<a class="dropdown-item" href="https://www.apache.org/">ASF Home</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/how-it-works.html">How it works</a>
<a class="dropdown-item" href="https://www.apache.org/licenses/">License</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="dropdown-item" href="https://www.apache.org/security/">Security</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/policies/conduct">Code of Conduct</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<div class="section">
<div class="container">
<div class="row py-4">
<div class="col-sm-12 card">
<div class="card-body pt-5">
<a class="edit-on-gh" href="https://github.com/apache/celix-site/edit/master/source/contributing/submitting-patches.md" title="Edit this page on GitHub">Edit on GitHub</a>
<h1 id="submitting-patches">Submitting patches</h1>
<nav id="TableOfContents">
<ul>
<li><a href="#contributing-with-github">Contributing with GitHub</a></li>
<li><a href="#committers">Committers</a></li>
<li><a href="#further-reading">Further reading</a></li>
</ul>
</nav>
<p class="alert alert-primary">
Celix uses Git so you must install a git client locally to be able to clone the Celix repository.
</p>
<p class="alert alert-primary">
The development workflow that Apache Celix is following is described <a href="development-workflow.html">here</a>.
</p>
<h2 id="contributing-with-github">Contributing with GitHub</h2>
<p>Using the GitHub mirror is the simplest way to contribute to Apache Celix if you are not a member
of the Celix Committers group.</p>
<p>First you must have an account created at GitHub to be able perform the next step. If you don&rsquo;t,
go ahead and create one just right now! Please remember to setup
<a href="https://help.github.com/articles/generating-ssh-keys">SSH keys</a> and test them! You don&rsquo;t have to use SSH Keys
if you are using the HTTPS url. In this case git simply uses user/password authentication.</p>
<p>When ready go to <a href="https://github.com/apache/celix">https://github.com/apache/celix</a> and click <code>Fork</code> button
in top right corner. This will fork the Apache Celix&rsquo; repository and will create your private (but public) repository
with the source code.</p>
<p>Next step is to clone the original repo locally</p>
<pre><code>git clone https://github.com/apache/celix.git
</code></pre>
<p>This will be an <code>origin</code>, you cannot push changes to the <code>origin</code> but don&rsquo;t worry, you will use your fork.</p>
<p>Now is time to add your fork as a remote</p>
<pre><code>git remote add fork https://github.com/my-username/celix.git
</code></pre>
<p>Right now you should have two remotes defined for the repo, <code>origin</code> and <code>fork</code>, use below command to confirm that</p>
<pre><code>git remote -v
</code></pre>
<p>Now you are ready to work with the Apache Celix&rsquo; code base.</p>
<p>Fetch any changes from the remote repository</p>
<pre><code>git fetch
git pull
</code></pre>
<p>You can now create branches for your changes (branches must be created from the <code>master</code> branch)</p>
<pre><code>git checkout -b my-branch
</code></pre>
<p>Do your changes and commit them to <code>my-branch</code>, when you&rsquo;re done you can push the changes to GitHub, to your fork.</p>
<pre><code>git push -u fork my-branch
</code></pre>
<p>If you still need to change something, please remember to commit and push changes, but this time you can use just</p>
<pre><code>git push
</code></pre>
<p>as <code>my-branch</code> was already connected with the remote branch.</p>
<p>The final step is to open a Pull Request (short: PR) against the original Apache Celix repo. Go to the
<a href="https://github.com/apache/celix">Apache Celix mirror</a>, then to <a href="https://github.com/apache/celix/pulls">Pull request</a>
and hit <a href="https://github.com/apache/celix/compare/">New Pull Request</a> button.</p>
<p>If not already selected, click on <code>compare across forks.</code> Right now you must select from the dropdowns on the right
your fork and branch to compare the differences with the Apache Celix&rsquo; <code>master</code> branch.</p>
<p>Finally, hit the <code>Create Pull Request</code> button and you are done!</p>
<p>After your PR got accepted and merged you must clean up your local repo, please switch your current branch to <code>master</code></p>
<pre><code>git checkout master
</code></pre>
<p>and fetch updates from remote</p>
<pre><code>git fetch -p
git pull
</code></pre>
<p>and now you can delete your local branch</p>
<pre><code>git branch -d my-branch
</code></pre>
<p>and you are ready to start working on another feature/issue.</p>
<h2 id="committers">Committers</h2>
<p>Committers can use either Apache GitBox</p>
<pre><code>git clone https://gitbox.apache.org/repos/asf/celix.git
</code></pre>
<p>or GitHub</p>
<pre><code>git clone https://github.com/apache/celix.git
</code></pre>
<p>and done!</p>
<h2 id="further-reading">Further reading</h2>
<ul>
<li><a href="https://infra.apache.org/git-primer.html">Git at Apache</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="py-3 bg-secondary">
<div class="container">
<div class="row">
<div class="col-md-8 text-center">
<p class="m-0 text-white">
Copyright &copy; 2023 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 Celix, Celix, Apache, the Apache feather logo and the Apache Celix logo are trademarks of The Apache Software Foundation.
</p>
</div>
<div class="col-md-4 text-center">
<a href="https://www.apache.org/events/current-event.html" target="_blank">
<img src="https://www.apache.org/events/current-event-234x60.png" title="Apache Event" width="234" height="60" border="0">
</a>
</div>
</div>
</div>
</footer>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>