Skip to content

Git Workflow

timmwille edited this page Mar 31, 2023 · 7 revisions

Workflows

We at #ASKnet have been able to gain a lot of experience from Git platforms and have developed some useful workflows along the way. If necessary, please check this section before asking questions that have already been answered many times. Feel free to help yourself from the toolbox and expand it.

Repository

We typically use the following workflow to either add content or make technical changes. Each of these has its own storage, called a branch. Changes can be made in this without changing the branch/location for the public site. The branch for the published page is called: "Main". For the content changes "Content" and for the technical ones "development".

git workflow

Legend
merge main to development Merge Main to development
pull request from content to main Pull request from content branch to main
pull request from development to main Pull request from development branch to main
Pull request from main branch to content Pull request from main branch to content
Copy some content to development branch It is possible to copy content to the Development Branch, but please never commit! Only the technical changes!

main branch

❗ If the content is changed on the main branch, then the public site is also changed with it.

Changes are also never made directly to the main branch. They are always made to the respective branch: Content or development. Only with a so-called Pull request (Review) the changes are transferred from the development or content branch to the main branch and thus the public website is changed.

development branch

All technical changes are made in the development branch. Be it HTML, CSS or Javascript. Once all the changes are made, they are transferred to the Main and content branches. This is called a merge and is organized in a Pull request and performed transparently. More information about Pull request.

As soon as the changes from the development branch are merged into the main branch, the content branch is updated as well. In this way, the content branch also remains technically up to date.

ℹ️ A preview is unfortunately only possible locally and not directly in this Github repository. There is still the possibility to fork the project and there you can activate Github Pages (more information about Github pages). To preview locally, a web server including Jekyll can easily be started using Docker. more information about setting up a local environment.

content branch

If images, texts or documents are to be changed or added, they are initially stored in the content branch and only transferred to the main branch with a Pull request.

To do this, you must switch to the content branch before making any changes. More information about Change content in content branch.

ℹ️ A preview is unfortunately only possible locally and not directly in this Github repository. There is still the possibility to fork the project and there you can activate Github Pages (more information about Github pages). To preview locally, a web server including Jekyll can easily be started using Docker. more information about setting up a local environment.

Pull request

With a pull request you can organize a merge from one branch to the next. As with an issue, a responsible person can be appointed and commented and thus discussed/organized.

More information about creating a pull request can be found here.