Skip to content
Snippets Groups Projects
version-control.md 2.26 KiB
Newer Older
Developers `MUST` use `git`.
Please see <https://git-scm.com/doc> for documentation.
We recommend to use the [GitLab](https://docs.gitlab.com/ee/topics/gitlab_flow.html)/
[GitHub](https://githubflow.github.io/) Flow.
In some cases it can make sense to use [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow),
though.
Also consult the [Git Flow Cheat
Michelle Weidling's avatar
Michelle Weidling committed
Sheet](https://danielkummer.github.io/git-flow-cheatsheet).
When using any kind of Flow it is good practice to protect your `main` and `develop` branch server-side.
This avoids accidental pushes to these branches.
All specific branches working on an issue described in a bug tracker `SHOULD` utilize the following naming scheme:\
`ISSUENUMBER-DESCRIPTION`\
e.g. `12-flux-capacitor`.
Using the GitLab/GitHub UI for creating a merge/pull request will automatically apply this scheme.
Also keep in mind GitLab Flow's [11 Rules](https://about.gitlab.com/blog/2016/07/27/the-11-rules-of-gitlab-flow/).
A GitHub workflow used in DARIAH-DE and related services is described in the
[DARIAH-DE Wiki](https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management#DARIAH-DEReleaseManagement-Beispielmitdevelop-undmaster-Branch(Gitflow)).
It is also `RECOMMENDED` to automatically close issues via commit message;
How this works exactly depends on the Git repository server.
Issues can also be [referenced across repositories](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas).
We currently use the following Git servers in RDD:

- Projects (GWDG) --> <https://projects.gwdg.de>
- GitLab (GWDG) --> <https://gitlab.gwdg.de>
- github.org --> <https://github.com/subugoe>

Which one is suitable for you depends on:

- the project you are working on
- existing code
- whether or not you want to use CI/CD or GitLab Runners
- ...

There is a [FE team on GitHub](https://github.com/orgs/subugoe/teams/fe).
Consider mirroring of repos for project visibility (e.g. mirror GitLab/Projects code to GitHub).
### Codebase

__TODO__ Add RDD suggestions for “Twelve-Factor App: I. Codebase“

### Further Reading

For more information on Git and related workflows, refer to the
[Atlassian tutorial](https://www.atlassian.com/git/tutorials/comparing-workflows).