dev:git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:git [2012/07/31 17:09] – [Configuring SSH] dbs | dev:git [2024/04/09 13:17] (current) – [Bug Fix Release Note Commit Message Tag] 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 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 | ||
</ | </ | ||
| | ||
- | If you have sent in your SSH pubkey and have commit | + | If you have sent your SSH pubkey |
<code bash> | <code bash> | ||
git push working working_branch: | git push working working_branch: | ||
Line 57: | Line 52: | ||
</ | </ | ||
- | Or if you just want to send a patch rather than push a branch to the working repo: | + | Alternately, |
<code bash> | <code bash> | ||
git format-patch origin | git format-patch origin | ||
# attach patch file(s) to Launchpad bug | # attach patch file(s) to Launchpad bug | ||
</ | </ | ||
- | ===== Quick start for committers ===== | ||
- | <code bash> | ||
- | # assuming you've provided a public SSH key to one of the Git administrators | ||
- | git clone git@git.evergreen-ils.org: | ||
- | cd Evergreen | ||
- | | ||
- | # Add the " | ||
- | git remote add working git@git.evergreen-ils.org: | ||
- | # Fetch all of the branches and updates from all remotes | ||
- | # Probably a good idea to do this every time you start another working session | ||
- | git fetch --all | ||
- | | ||
- | # Set your email and user name | ||
- | git config user.email user@hostname | ||
- | git config user.name " | ||
- | | ||
- | # Create a new working branch, where " | ||
- | # that describes the work you're planning on doing in that branch | ||
- | git checkout -b working_branch | ||
- | | ||
- | # hack away | ||
- | git commit -as # and enter a useful comment | ||
- | git pull origin # sync with the rest of the world | ||
- | git push origin working_branch: | ||
- | </ | ||
===== Git resources ===== | ===== Git resources ===== | ||
Line 101: | Line 71: | ||
LP#24544: fix the quuxifier | LP#24544: fix the quuxifier | ||
+ | | ||
+ | Release-Note: | ||
| | ||
Signed-off-by: | Signed-off-by: | ||
Line 119: | Line 91: | ||
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 133: | Line 124: | ||
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 142: | Line 133: | ||
</ | </ | ||
- | 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 163: | Line 154: | ||
==== Branches ==== | ==== Branches ==== | ||
- | The tip of Evergreen development is '' | + | The tip of Evergreen development is '' |
====== Community Git Repository ====== | ====== Community Git Repository ====== | ||
Line 186: | Line 177: | ||
Working repos are intended for use by individual developers. | Working repos are intended for use by individual developers. | ||
- | Any developer that has submitted their public key can can push to user or collab branches on a working repo. | + | Any developer that has submitted their public key can push to user or collab branches on a working repo. |
User branches start with user/USER/ where USER is the developer' | User branches start with user/USER/ where USER is the developer' | ||
Line 194: | Line 185: | ||
Only the user who created the branch can non-ff push or delete it, but anyone can push to it otherwise. | Only the user who created the branch can non-ff push or delete it, but anyone can push to it otherwise. | ||
- | In some cases the username is simple, in others it is an email address. If you do not know your username you can ask one of the git administrators, | + | In some cases the username is simple, in others it is an email address. If you do not know your username you can ask one of the git administrators, |
To track these repositories, | To track these repositories, | ||
Line 245: | Line 236: | ||
Add a branch entitled " | Add a branch entitled " | ||
<code bash>git remote add working git@git.evergreen-ils.org: | <code bash>git remote add working git@git.evergreen-ils.org: | ||
+ | |||
+ | //Note: If you've already done this before, you'll get " | ||
Make git aware of the remote branch(es) | Make git aware of the remote branch(es) | ||
Line 268: | Line 261: | ||
* Galen Charlton | * Galen Charlton | ||
- | * Thomas Berezansky | + | * Jason Stephenson |
====== Helpful Scripts ====== | ====== Helpful Scripts ====== | ||
Line 283: | Line 276: | ||
< | < | ||
- | # 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 296: | Line 289: | ||
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.1343768940.txt.gz · Last modified: 2022/02/10 13:34 (external edit)