Author: pat
Date: Mon Jun 9 02:01:47 2014
New Revision: 1601299
URL: http://svn.apache.org/r1601299
Log:
reworking committer setup
Modified:
mahout/site/mahout_cms/trunk/content/developers/github.mdtext
Modified: mahout/site/mahout_cms/trunk/content/developers/github.mdtext
URL:
http://svn.apache.org/viewvc/mahout/site/mahout_cms/trunk/content/developers/github.mdtext?rev=1601299&r1=1601298&r2=1601299&view=diff
==============================================================================
--- mahout/site/mahout_cms/trunk/content/developers/github.mdtext (original)
+++ mahout/site/mahout_cms/trunk/content/developers/github.mdtext Mon Jun 9
02:01:47 2014
@@ -37,28 +37,37 @@ To attach to the apache git repo do the
git remote add apache https://git-wip-us.apache.org/repos/asf/mahout.git
-Now if you want to experiment with a branch do the following:
+To check your remote setup
+
+ git remote -v
+
+you should see something like this:
+
+ origin https://github.com/your-github-id/mahout.git (fetch)
+ origin https://github.com/your-github-id/mahout.git (push)
+ apache https://git-wip-us.apache.org/repos/asf/mahout.git (fetch)
+ apache https://git-wip-us.apache.org/repos/asf/mahout.git (push)
+
+Now if you want to experiment with a branch everything, by default, points to
your github account because 'origin' is default. You can work as normal using
only github until you are ready to merge with the apache remote. Some
conventions will integrate with Apache Jira ticket numbers.
git checkout -b mahout-xxxx #xxxx typically is a Jira ticket number
#do some work on the branch
git commit -a -m "MAHOUT-XXXX doing some work"
- git push origin mahout-xxxx #notice pushing to 'origin' not 'apache'
+ git push origin mahout-xxxx # notice pushing to 'origin' not 'apache'
-Once you are ready to commit to the apache master you can push them directly
**if they are very small changes**. Do the following:
+Once you are ready to commit to the apache master you can push them directly:
- git checkout master
+ git checkout master
+ git pull apache master # may have to fix merge conflicts
git merge mahout-xxxx
# check build and tests
- git push apache master #this pushes all changes you just merged
-
-For most non-trivial work it's best to use a PR so go to your github account,
pick the branch you want to push and create a pull request. Github will ask for
the "base fork:" this should be github's apache/mahout , and the "base:" should
be "master". This will create a pull request for review on gtihub. Once the
review is complete proceed to merging below.
+ git push apache master #this pushes all changes you just merged to the
apache git remote repo
-## PR's For Collaboration
+Since PRs reference a specific user's branch they may be used by committers to
collaborate with others or
+to get reviews before pushing to apache. Creating a PR only establishes a
place to review, you will have to
+merge your branch as above to get it into apache/master.
-Creating a PR is also useful when you want to collaborate on something. Even
though the PR will never be merged with the master branch it is perfectly
acceptable to submit one so another committer can grab it and contribute or
comment. Just make sure to note that it is not meant for merging. Typically you
will merge your own PRs so this won't be a problem. Another way to do this
would be to create a branch on the main
-Apache git remote but this will soon clutter the repo with lots of temporary
branches that might be better handled through the PR mechanism.
-
-## Merging a PR and closing it (for committers)
+## Merging a contributor's PR and closing it (for committers)
Start with reading \[[2]\] (merging locally).
@@ -74,27 +83,12 @@ Merging pull requests are equivalent to
git pull --squash https://github.com/cuser/mahout cbranch # merge to
master
Squash pull ensures all PR history is squashed into single commit, and allows
committer to use his/her own
-message. Read git help for merge or pull for more information about `--squash`
option.
-
-In this example we assume that the contributor's or committer's Github handle
is "cuser" and the PR branch name is "cbranch" there.
-
-We also assume that *apache* remote is configured as stated above. To check do
the following
-
- git remote -v
-
-you should see something like this:
-
- origin https://github.com/cuser/mahout.git (fetch)
- origin https://github.com/cuser/mahout.git (push)
- apache https://git-wip-us.apache.org/repos/asf/mahout.git (fetch)
- apache https://git-wip-us.apache.org/repos/asf/mahout.git (push)
-
-
+message. Read git help for merge or pull for more information about `--squash`
option. In this example we assume that the contributor's Github handle is
"cuser" and the PR branch name is "cbranch".
Next, resolve conflicts, if any, or ask a contributor to rebase on top of
master, if PR went out of sync.
-Also run regular patch checks and change CHANGELOG.
+Remember to run regular patch checks, build with tests enabled, and change
CHANGELOG.
-Suppose everything is fine, you now can commit the squashed request along the
lines
+If everything is fine, you now can commit the squashed request along the lines
git commit -a -m "MAHOUT-YYYY description (cuser via your-apache-id)
closes apache/mahout#ZZ"
@@ -111,9 +105,6 @@ The PR, once pushed, will get mirrored t
push origin master
-
-
-
*Note on squashing: Since squash discards remote branch history, repeated PRs
from the same remote branch are
difficult for merging. The workflow implies that every new PR starts with a
new rebased branch. This is more
important for contributors to know, rather than for committers, because if new
PR is not mergeable, github