hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "HowToCommitWithGit" by karthikkambatla
Date Sun, 24 Aug 2014 17:26:57 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "HowToCommitWithGit" page has been changed by karthikkambatla:
https://wiki.apache.org/hadoop/HowToCommitWithGit?action=diff&rev1=23&rev2=24

  Hadoop uses git for version control. The writable repo is at - TODO
  
  ==== Initial setup ====
- We try to keep our history all linear and avoid merge commits. To this end, we highly recommend
using git pull --rebase. In general, it is a good practice to have this *always* turned on.
If you haven't done so already, you should probably run the following:
+ We try to keep our history all linear and avoid merge commits. To this end, we highly recommend
using git pull --rebase. In general, it is a good practice to have this ''always'' turned
on. If you haven't done so already, you should probably run the following:
+ {{{
- {{{$ git config --global branch.autosetuprebase always}}}
+ $ git config --global branch.autosetuprebase always
+ }}}
  
+ ==== Committing a patch ====
- When you commit a patch, please:
+ When you commit a patch, please follow these steps:
+  1. '''CHANGES.txt:''' Add an entry in CHANGES.txt, at the end of the appropriate section.
This should include the JIRA issue ID, and the name of the contributor.
+  1. '''Commit locally:''' Commit the change locally to the appropriate branch (should be
''master'' if it is not a feature branch) using {{{git commit -a -m <commit-message>}}}.
The commit message should include the JIRA issue id, along with a short description of the
change and the name of the contributor if it is not you. ''Note:'' Be sure to get the issue
id right, as this causes JIRA to link to the change in git (use the issue's "All" tab to see
these). Verify all the changes are included in the commit using {{{git status}}}. If there
are any remaining changes (previously missed files), please commit them and squash these commits
into one using {{{git rebase -i}}}.
+  1. '''Pull latest changes from remote repo:''' Pull in the latest changes from the remote
branch using {{{git pull --rebase}}} (--rebase is not required if you have setup git pull
to always --rebase). Verify this didn't cause any merge commits using {{{git log [--pretty=oneline]}}}
+  1. '''Push changes to remote repo:''' Build and run a test to ensure it is all still kosher.
Push the changes to the remote (main) repo using {{{git push <remote> <branch>}}}.
+  1. If the changes were to master, cherry-pick the changes to other appropriate branches
via {{{git cherry-pick -x <commit>}}}. The -x option records the source commit. Make
sure to resolve any conflicts.  
+  1. Resolve the issue as fixed, thanking the contributor.  Always set the "Fix Version"
at this point, but please only set a single fix version, the earliest release in which the
change will appear. '''Special case'''- when committing to a ''non-mainline'' branch (such
as branch-0.22 or branch-0.23 ATM), please set fix-version to either 2.x.x or 3.x.x appropriately
too.
  
+ This How-to-commit [[http://www.youtube.com/watch?v=txW3m7qWdzw&feature=youtu.be|video]]
has guidance on the commit process, albeit using svn. Most of the process is still the same,
except that we now use git instead. 
-  1. Add an entry in CHANGES.txt, at the end of the appropriate section.  This should include
the JIRA issue ID, and the name of the contributor.
-  1. Include the JIRA issue id in the commit message, along with a short description of the
change and the name of the contributor if it is not you.  Be sure to get the issue id right,
as this causes JIRA to link to the change in Subversion (use the issue's "All" tab to see
these).
-  1. Resolve the issue as fixed, thanking the contributor.  Always set the "Fix Version"
at this point, but please only set a single fix version, the earliest release in which the
change will appear. '''Special case'''- when committing to a ''non-mainline'' branch (such
as branch-0.22 or branch-0.23 ATM), please set fix-version to either 2.x.x or 3.x.x appropriately
too.
-  1. Use the -E option to make sure that empty files are removed during the commit.
- 
- You can find a guidance on how to commit a patch to the Hadoop SVN repository in this [[http://www.youtube.com/watch?v=txW3m7qWdzw&feature=youtu.be|video]].
  
  <<Anchor(Documentation)>>
  ==== Committing Documentation ====

Mime
View raw message