Github user kottmann commented on a diff in the pull request:

    https://github.com/apache/opennlp-site/pull/21#discussion_r123439326
  
    --- Diff: src/main/jbake/content/using-git.ad ---
    @@ -0,0 +1,178 @@
    +////
    +   Licensed to the Apache Software Foundation (ASF) under one
    +   or more contributor license agreements.  See the NOTICE file
    +   distributed with this work for additional information
    +   regarding copyright ownership.  The ASF licenses this file
    +   to you under the Apache License, Version 2.0 (the
    +   "License"); you may not use this file except in compliance
    +   with the License.  You may obtain a copy of the License at
    +
    +     http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing,
    +   software distributed under the License is distributed on an
    +   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +   KIND, either express or implied.  See the License for the
    +   specific language governing permissions and limitations
    +   under the License.   
    +////
    += Using Git
    +:jbake-type: page
    +:jbake-tags: maven
    +:jbake-status: published
    +:idprefix:
    +
    +There are several ways to setup Git for committers and contributors. 
Contributors can safely setup Git any way they
    +choose but committers should take extra care since they can push new 
commits to the master at Apache and various
    +policies there make backing out mistakes problematic. Therefore all but 
very small changes should go through a PR,
    +even for committers. To keep the commit history clean take note of the use 
of `--squash` below when merging into
    +`apache/master`.
    +
    +## Git setup for Committers
    +
    +This describes setup for one local repo and two remotes. It allows you to 
push the code on your machine to either your
    +GitHub repo or to Git at Apache (i.e. git-wip-us.apache.org). You will 
want to fork GitHub's apache/opennlp to your own
    +account on GitHub, this will enable Pull Requests of your own. Cloning 
this fork locally will set up "origin" to point
    +to your remote fork on GitHub as the default remote. So if you perform 
"git push origin master" it will go to GitHub.
    +
    +To attach to the apache Git repo do the following:
    +
    +    git remote add apache 
https://git-wip-us.apache.org/repos/asf/opennlp.git
    +
    +To check your remote setup:
    +
    +    git remote -v
    +
    +You should see something like this:
    +
    +    origin    https://github.com/your-github-id/opennlp.git (fetch)
    +    origin    https://github.com/your-github-id/opennlp.git (push)
    +    apache    https://git-wip-us.apache.org/repos/asf/opennlp.git (fetch)
    +    apache    https://git-wip-us.apache.org/repos/asf/opennlp.git (push)
    +
    +Now if you want to experiment with a branch, this by default points to 
your GitHub account because "origin" is default.
    +You can work as you normally do using just GitHub, until you are ready to 
merge with the Apache remote repository.
    +Some conventions will integrate with Apache JIRA ticket numbers.
    +
    +    git checkout -b opennlp-xxxx #xxxx typically is a JIRA ticket number
    +    #do some work on the branch
    +    git commit -a -m "doing some work"
    +    git push origin opennlp-xxxx # notice pushing to **origin** not 
**apache**
    +
    +Once you are ready to commit to the Apache remote you can merge and push 
them directly, or better yet create a
    +pull request (PR). 
    +
    +## How to create a PR (committers)
    +
    +Push your branch to GitHub:
    +
    +    git checkout opennlp-xxxx
    +    git push origin opennlp-xxxx
    --- End diff --
    
    Maybe nicer to have the command to set the upstream, otherwise you have to 
write everytime origin.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to