Git Workflow » History » Version 17
Alexander Watzinger, 2022-11-12 15:36
1 | 1 | Alexander Watzinger | h1. Git Workflow |
---|---|---|---|
2 | |||
3 | We are using "git":https://git-scm.com/ as a versioning system using the "Git Branching Workflows":https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows |
||
4 | |||
5 | 17 | Alexander Watzinger | h2. Branches |
6 | 1 | Alexander Watzinger | |
7 | * *main* - the stable version used in productive environments. It is the latest release version which is tested and, to our knowledge, bug-free. |
||
8 | 17 | Alexander Watzinger | * *develop* - here the latest development branches are joined when they are finished. |
9 | * *release_candidate* - a special branch made from develop a few days before a release. This branch is *frozen*: no new features allowed, it's only for testing, fixing and manual updates. |
||
10 | 1 | Alexander Watzinger | |
11 | 17 | Alexander Watzinger | Branches in which the work (in progress) is happening have following prefixes: |
12 | * *feature_* - e.g. feature_user_profile_image |
||
13 | 1 | Alexander Watzinger | * *fix_* - e.g. fix_map_bug |
14 | |||
15 | 13 | Alexander Watzinger | h2. Workflow |
16 | 1 | Alexander Watzinger | |
17 | 13 | Alexander Watzinger | If working on a new feature/fix: |
18 | |||
19 | 16 | Alexander Watzinger | * Start with a new branch from *develop* and call it _feature_something_ or _fix_something_ |
20 | 15 | Alexander Watzinger | <pre> |
21 | git checkout develop |
||
22 | git checkout -b feature_something |
||
23 | </pre> |
||
24 | * Implement changes, commit |
||
25 | <pre> |
||
26 | git add . |
||
27 | git commit -m "Implemented feature something" |
||
28 | 1 | Alexander Watzinger | </pre> |
29 | * Merge *develop* regularly to your branch to keep merge conflicts to a minimum but at least before merging back |
||
30 | 15 | Alexander Watzinger | <pre> |
31 | git merge develop |
||
32 | </pre> |
||
33 | 17 | Alexander Watzinger | * Make sure that all tests pass, ideally have 100% coverage and Mypy checks are passing |
34 | 13 | Alexander Watzinger | * Document database changes (see below) and add translations if needed |
35 | 1 | Alexander Watzinger | * Merge your branch to *develop* |
36 | 15 | Alexander Watzinger | <pre> |
37 | git checkout develop |
||
38 | git merge feature_something |
||
39 | </pre> |
||
40 | 14 | Alexander Watzinger | |
41 | 17 | Alexander Watzinger | About once a month a new *release_candidate* branch is made from *develop* which, after some quality checks, is than released and merged into the *main* branch. |
42 | 6 | Alexander Watzinger | |
43 | h2. Database changes |
||
44 | |||
45 | If there are database changes make sure that |
||
46 | 8 | Alexander Watzinger | |
47 | 17 | Alexander Watzinger | * there is a comment with the issue number at the SQL update script (e.g. install/upgrade/3.12.0.sql) to easier deal with installations that were already partially updated (e.g. the demo-dev version) |
48 | * the database change is noted at util/changelog.py |
||
49 | * the database version is added in config/database_versions.py |