Skip to content

Git workflow

Git Workflow

This repository uses a simple, linear Git workflow optimized for solo development.

Updating Current Branch

Always update current branch using fast forward only:

git pull --ff-only

Making Changes

For small changes, work directly on main.

git checkout main
git pull --ff-only

# make changes

git add .
git commit -m "type(scope): description"
git push

For larger changes, follow the branching strategy.

Before Pushing

Always ensure local branch is up to date before pushing:

git pull --ff-only

If the pull cannot be completed as a fast forward, inspect the situation and resolve it intentionally rather than creating a merge commit.

Tips

Prefer a clean, readable commit history.

Example:

feat: add auth logic
fix: handle invalid error raised
refactor: simplify LoggingMiddleware
docs(setup): update development guide

Avoid unnecessary merge commits and noisy history entries when possible.

Example:

Merge branch 'main'
Merge branch 'main' into feature/x
Merge pull request #12 from feature/...

To make --ff-only the default behavior for pulls:

git config --global pull.ff only

After this, a regular pull will behave as:

git pull --ff-only