dev:git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:git [2022/02/10 13:34] – external edit 127.0.0.1 | dev:git [2025/04/15 13:22] (current) – Include a section on commit template under Commit Guidelines stompro | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| ===== Configuring SSH ===== | ===== Configuring SSH ===== | ||
| If the SSH key you use for this Git repo isn't located at: '' | If the SSH key you use for this Git repo isn't located at: '' | ||
| - | Host EvergreenGitServer | + | Host git.evergreen-ils.org |
| - | Hostname=git.evergreen-ils.org | + | |
| IdentityFile=< | IdentityFile=< | ||
| - | </ | ||
| - | |||
| - | Then use the name __EvergreenGitServer__ instead of the host in commands, for instance:< | ||
| - | git remote add name git@EvergreenGitServer: | ||
| </ | </ | ||
| Line 46: | Line 41: | ||
| git config user.name " | git config user.name " | ||
| | | ||
| - | git checkout -b working_branch origin/master | + | |
| + | git config commit.template commit-template | ||
| + | |||
| + | | ||
| # hack away | # hack away | ||
| git commit -as # and enter a useful comment | git commit -as # and enter a useful comment | ||
| Line 71: | Line 69: | ||
| ====== Guidelines for contributors ====== | ====== Guidelines for contributors ====== | ||
| + | ===== Commit Template ===== | ||
| + | |||
| + | The Evergreen git repo includes an optional commit template that can be used to help follow standard project formatting. | ||
| + | |||
| + | Enable commit template: | ||
| + | git config commit.template commit-template | ||
| + | Disable commit template: | ||
| + | git config --unset commit.template | ||
| + | | ||
| ===== Commit messages ===== | ===== Commit messages ===== | ||
| - | A commit message should consist of a subject line (i.e., the first line of the commit message), then a blank line, then an optional description of the patch, followed by one or more signoffs. | + | A commit message should consist of a subject line (i.e., the first line of the commit message), then a blank line, then an optional description of the patch, followed by one or more signoffs. |
| LP#24544: fix the quuxifier | LP#24544: fix the quuxifier | ||
| + | | ||
| + | Release-Note: | ||
| | | ||
| Signed-off-by: | Signed-off-by: | ||
| Line 94: | Line 103: | ||
| Signed-off-by: | Signed-off-by: | ||
| Signed-off-by: | Signed-off-by: | ||
| + | |||
| + | ===== Bug Fix Release Note Commit Message Tag ===== | ||
| + | |||
| + | For simple bug fixes that can be described with one line, include a line that starts with " | ||
| + | |||
| + | ==== Use Present Tense ==== | ||
| + | |||
| + | " | ||
| + | |||
| + | If the bug fix needs more explanation, | ||
| + | |||
| + | Examples: | ||
| + | Release-Note: | ||
| + | Release-Note: | ||
| + | ===== Testing Plan ===== | ||
| + | |||
| + | Include a testing plan to ensure that any testers of your patch can quickly understand how to see the original problem and know how to confirm that the fix works. | ||
| + | |||
| + | It is also acceptable to include the testing plan in the Launchpad ticket, but a note in the commit message such as "See LP bug report for testing plan" can make sure the tester knows where to find it. | ||
| ===== Sign-offs ===== | ===== Sign-offs ===== | ||
| Line 108: | Line 136: | ||
| The easiest way to sign-off on one or more commits is to: | The easiest way to sign-off on one or more commits is to: | ||
| - | - Create a new branch based on current | + | - Create a new branch based on current |
| - Cherry-pick the commits using the '' | - Cherry-pick the commits using the '' | ||
| - **Test** to ensure that everything still works | - **Test** to ensure that everything still works | ||
| Line 117: | Line 145: | ||
| </ | </ | ||
| - | We typically create branches for review that have the pertinent commits at the tip of the branch - that is, the most recent commits. However, if a long-lived branch has merged changes from master | + | We typically create branches for review that have the pertinent commits at the tip of the branch - that is, the most recent commits. However, if a long-lived branch has merged changes from main over time, you might need to use a tool like '' |
| For example, to sign-off on two commits with hashes matching '' | For example, to sign-off on two commits with hashes matching '' | ||
| - | # Ensure you have the latest revision of master | + | # Ensure you have the latest revision of main |
| $ git fetch --all | $ git fetch --all | ||
| - | $ git checkout -b openurl-more origin/master | + | $ git checkout -b openurl-more origin/main |
| # or if the intention is to backport to the rel_2_1 release: | # or if the intention is to backport to the rel_2_1 release: | ||
| # git checkout -b openurl-more_rel_2_1 origin/ | # git checkout -b openurl-more_rel_2_1 origin/ | ||
| Line 138: | Line 166: | ||
| ==== Branches ==== | ==== Branches ==== | ||
| - | The tip of Evergreen development is '' | + | The tip of Evergreen development is '' |
| ====== Community Git Repository ====== | ====== Community Git Repository ====== | ||
| Line 245: | Line 273: | ||
| * Galen Charlton | * Galen Charlton | ||
| - | * Thomas Berezansky | ||
| - | * Dan Scott | ||
| * Jason Stephenson | * Jason Stephenson | ||
| Line 262: | Line 288: | ||
| < | < | ||
| - | # git url origin/master | + | # git url origin/main |
| - | For sharing origin/master | + | For sharing origin/main via the remote repo origin: |
| Change remote_name as appropriate in the below commands. | Change remote_name as appropriate in the below commands. | ||
| Line 275: | Line 301: | ||
| Once you have the remote added you can check out this branch: | Once you have the remote added you can check out this branch: | ||
| - | git checkout -b master | + | git checkout -b main remote_name/ |
| </ | </ | ||
dev/git.1644518097.txt.gz · Last modified: 2022/02/10 13:34 by 127.0.0.1