User Tools

Site Tools


dev:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:git [2016/08/29 14:21] – [Git administrators] updated list of gitadmins gmcharltondev: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: ''~/.ssh/id_rsa'' then you will need the following configuration file in ''~/.ssh/config'':<code> If the SSH key you use for this Git repo isn't located at: ''~/.ssh/id_rsa'' then you will need the following configuration file in ''~/.ssh/config'':<code>
-  Host EvergreenGitServer +  Host git.evergreen-ils.org
-    Hostname=git.evergreen-ils.org+
     IdentityFile=<LOCATION OF YOUR SSH KEY>     IdentityFile=<LOCATION OF YOUR SSH KEY>
-</code> 
- 
-Then use the name __EvergreenGitServer__ instead of the host in commands, for instance:<code bash> 
-git remote add name git@EvergreenGitServer:evergreen/user_foo.git 
 </code> </code>
  
Line 46: Line 41:
   git config user.name "Firstname Lastname"   git config user.name "Firstname Lastname"
      
-  git checkout -b working_branch origin/master+  #Enable the Evergreen default commit template 
 +  git config commit.template commit-template 
 +   
 +  git checkout -b working_branch origin/main
   # 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.  [[https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=commit-template;hb=HEAD|View the current main version of the template.]]
 +
 +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.  The subject line should be brief, ideally no more than 60-70 characters, and should include a bug number from LaunchPad if relevant.  Here is an example of a minimum commit message:+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.  The subject line should be brief, ideally no more than 60-70 characters. Although it is acceptable to omit the Launchpad bug number from commit messages while work is in progressby pullrequest time, each commit in a branch should include this number if relevant.  Here is an example of a minimum commit message:
  
   LP#24544: fix the quuxifier   LP#24544: fix the quuxifier
 +  
 +  Release-Note: Fix the cromulent emulsification of the quuxifier for new installs.
      
   Signed-off-by: Jane Hacker <jhacker@example.org>   Signed-off-by: Jane Hacker <jhacker@example.org>
Line 94: Line 103:
   Signed-off-by: Roger Reviewer <roger@example.com>   Signed-off-by: Roger Reviewer <roger@example.com>
   Signed-off-by: Chris Committer <chris@example.net>   Signed-off-by: Chris Committer <chris@example.net>
 +
 +===== Bug Fix Release Note Commit Message Tag =====
 +
 +For simple bug fixes that can be described with one line, include a line that starts with "**Release-Note:**" that includes the release note text.  This will be grabbed by a script during release creation to speed up creating the release notes.
 +
 +==== Use Present Tense ====
 +
 +"**Release-Note:**" entries should use present tense; **Add**, **Adds**, **Fixes**, **Updates**, **Removes**.
 +
 +If the bug fix needs more explanation, then the docs/RELEASE_NOTES_NEXT/miscellaneous.adoc would be a better location to add those notes.
 +
 +Examples:
 +  Release-Note: Adds form field labels for patron survey question administration
 +  Release-Note: Fixes an issue where auto-renewal events can overwhelm open-ils.trigger drones
 +===== 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.  If a specific system configuration needs to be setup to see the problem in a Concerto Evergreen install, then include those steps.
 +
 +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 master (or, if backporting a fix to a previous release, from the appropriate release branch)+  - Create a new branch based on current main (or, if backporting a fix to a previous release, from the appropriate release branch)
   - Cherry-pick the commits using the ''-s'' flag   - Cherry-pick the commits using the ''-s'' flag
   - **Test** to ensure that everything still works   - **Test** to ensure that everything still works
Line 117: Line 145:
 </code> </code>
  
-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 over time, you might need to use a tool like ''tig'' to view the changes.+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 ''tig'' to view the changes.
  
 For example, to sign-off on two commits with hashes matching ''d28dfa2'' and ''a30de02'' using a local branch name of //openurl-more// and push them to a remote branch in the //working// repo named //user/myname/openurl-signoff//: <code bash> For example, to sign-off on two commits with hashes matching ''d28dfa2'' and ''a30de02'' using a local branch name of //openurl-more// and push them to a remote branch in the //working// repo named //user/myname/openurl-signoff//: <code bash>
-# 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/rel_2_1 # git checkout -b openurl-more_rel_2_1 origin/rel_2_1
Line 138: Line 166:
 ==== Branches ==== ==== Branches ====
  
-The tip of Evergreen development is ''master'', while branches that start with ''rel_'' are maintenance branches for release series.  Branches that start with ''tags/'' are legacies of Evergreen's previous Subversion repository, and should not be confused with Git tags.+The tip of Evergreen development is ''main'', while branches that start with ''rel_'' are maintenance branches for release series.  Branches that start with ''tags/'' are legacies of Evergreen's previous Subversion repository, and should not be confused with Git tags.
  
 ====== 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:
  
 <code> <code>
-# git url origin/master +# git url origin/main 
-For sharing origin/master via the remote repo origin:+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 remote_name/master+git checkout -b main remote_name/main
 </code> </code>
  
dev/git.1472494865.txt.gz · Last modified: 2022/02/10 13:34 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.