-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-22311 - Update community docs to recommend use of "Co-authored-… #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2300,19 +2300,37 @@ message is in their patch and you can use that, but be sure the JIRA ID is at | |
| the front of the commit message, even if the contributor left it out. | ||
|
|
||
| [[committer.amending.author]] | ||
| ====== Add Amending-Author when a conflict cherrypick backporting | ||
| ====== Use GitHub's "Co-authored-by" when there are multiple authors | ||
|
|
||
| We've established the practice of committing to master and then cherry picking back to branches whenever possible, unless | ||
|
|
||
| * it's breaking compat: In which case, if it can go in minor releases, backport to branch-1 and branch-2. | ||
| * it's a new feature: No for maintenance releases, For minor releases, discuss and arrive at consensus. | ||
|
|
||
| When there is a minor conflict we can fix it up and just proceed with the commit. | ||
| The resulting commit retains the original author. | ||
| When the amending author is different from the original committer, add notice of this at the end of the commit message as: `Amending-Author: Author | ||
| <committer&apache>` See discussion at link:http://search-hadoop.com/m/DHED4wHGYS[HBase, mail # dev | ||
| - [DISCUSSION] Best practice when amending commits cherry picked | ||
| from master to branch]. | ||
| There are occasions when there are multiple author for a patch. | ||
| For example when there is a minor conflict we can fix it up and just proceed with the commit. | ||
| The amending author will be different from the original committer, so you should also attribute to the original author by | ||
| adding one or more `Co-authored-by` trailers to the commit's message. | ||
| See link:https://help.github.com/en/articles/creating-a-commit-with-multiple-authors/[the GitHub documentation for "Creating a commit with multiple authors"]. | ||
|
|
||
| In short, these are the steps to add Co-authors that will be tracked by GitHub: | ||
|
|
||
| . Collect the name and email address for each co-author. | ||
| . Commit the change, but after your commit description, instead of a closing quotation, add two empty lines. (Do not close the commit message with a quotation mark) | ||
| . On the next line of the commit message, type `Co-authored-by: name <[email protected]>`. After the co-author information, add a closing quotation mark. | ||
|
|
||
| Here is the example from the GitHub page, using 2 Co-authors: | ||
| [source,xml] | ||
| ---- | ||
| $ git commit -m "Refactor usability tests. | ||
| > | ||
| > | ||
| Co-authored-by: name <[email protected]> | ||
| Co-authored-by: another-name <[email protected]>" | ||
| ---- | ||
|
|
||
| Note: `Amending-Author: Author <committer@apache>` was used prior to this | ||
| link:https://lists.apache.org/thread.html/f00b5f9b65570e777dbb31c37d7b0ffc55c5fc567aefdb456608a042@%3Cdev.hbase.apache.org%3E[DISCUSSION]. | ||
|
|
||
| ====== Close related GitHub PRs | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.