Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update git.apache link

...

Code Block
languagebash
# Clone the Apache repository. 
git clone https://git-wip-us.apache.org/repos/asf/hawq.git

# Enter the code directory
cd hawq
 
# Add your own forked github repo as “myfork” (used only for code review purpose)
git remote add myfork https://github.com/changleicn/hawq

# Merge the update of the upstream into your local master
git checkout master && git pull origin master

# Create a feature branch “feature-awesome” to work on
git checkout -b feature-awesome master

# Make changes and commit to local. Please format commit message as follows and feel free to add additional comments.
# <jira ticket number>. <Commit Message>
# Example: HAWQ-1002. Add awesome feature 
git commit -a -m "HAWQ-1002. Add awesome feature"

# Push it to your own github fork for code review
git push --set-upstream myfork feature-awesome

...

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/hawq.git

# Add remote github mirror repository
git remote add github https://github.com/apache/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
# For some cases, 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

 
# In case of some contributor often forget to close pull request,
# Append commit message to automatically close pull request after code merged. e.g. PR number is 12:
run `git commit --amend` and append "(close #12)" in a new line to commit message.
 
# Push to apache repo (note: all commits needs an Apache JIRA)
git push origin master

# Delete the feature branch
# And close the JIRA & add comment in the pull request to ask the contributor to close the pull request
git branch -d feature_awesome
 

...