Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# Create a working directory
mkdir working
cd working

# Clone the apache repository
git clone https://git-wip-us.apache.org/repos/asf/incubator-hawq.git

# Add remote github mirror repository
git remote add github https://github.com/apache/incubator-hawq.git

# Get the pull request, using PR#2 as example, you can replace 2 with any other PR #.
git fetch github pull/2/head:feature_awesome

# Sometimes, the commits in the patch is based on old master
# So it needs to be rebased on current master
# And most times, the committer should squash the commits in the branch into one commit
# And the original AUTHOR information should be kept to give credits to the contributor
git checkout feature_awesome
git rebase origin master
 
# Merge the patch (an alternative way to do this is to use "git cherry-pick")
git checkout master
git rebase feature_awesome

# Build
make

# Run tests (more in future before committing to “master” branch)
# Before run the following tests, you need to set up and start HDFS & HAWQ 
# More setup details are at: https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install).
make installcheck-good

# Push to apache repo (note: all commits needs an Apache JIRA)
git push origin master

# Delete the feature branch
git branch -d feature_awesome
 
# Clean up the working directory
cd ..
rm -fr working

...