Skip to content
Máté Homolya
Writing

Kill any project: CI and git workflows

How I organise a solo project with tasks, branches, pull requests and a simple deployment, using a word solver app as the example.

Note that since all of these tasks are mine, there is no point in having a property called "Assign". The complexity scales as the team scales and as more people are involved with different sets of skills and roles. When I complete a task, I can then reference the commit in the description. This is useful so when you or your teammate want to review the changes, you can get a high-level overview of which tasks were done in which commit to the repo.

A successful git branching model

Git is a form of distributed version control. I learnt what a successful branching model means from an article by Vincent Driessen.

A successful Git branching model

As he points out, this still stands today as an industry standard, however, it is really up to the developers to decide what's the best fit for their team. Today, a much simpler alternative is branching using GitHub flow. Fundamentally, branches are there to separate a piece of work from the rest of the codebase on the main branch. Once ready, you and your collaborators may review the changes about to be merged back into the main branch.

Code review and pull requests

It's all about opening the discussion to other collaborators and having more transparency and control over what gets put into the actual codebase. No need to overcomplicate it. When a feature is deemed to be finished, I now want to deploy my changes to the main codebase, as well as a new build to some environment like staging or production. Merge requests and pull requests are similar concepts that allow developers to review their code before deploying their changes.

A list of pull requests on GitHub

To open a pull request, simply pick two branches that you want to compare and start the discussion and review of the changes directly on GitHub.

Opening a pull request by comparing two branches

This pull request can then be linked to either a set of tasks (such as a feature, milestone or user story), or just a single task by copying its URL to your task management software, say Notion or Jira. They are also a way of controlling who is able to author commits on specific branches, since commits to some branches can trigger a CI/CD script to a target environment like staging or production.

Deployment

Let's assign a domain to the Word Solver app, say word-solver.mateh.dev. How do I get the site to load if I visit this link? In system design, there are many ways to design a backend architecture to serve an application. In my case it's very simple since I don't need my system to scale to serve millions of users, and it can be just a single server instance that has a few API endpoints and serves a static web page. Here are the factors I considered:

  • The cloud hosting service needs to be free of charge
  • I want to deploy Docker containers

CI/CD automation with scripts