Engineering Hygiene: Version Control & CI/CD

Writing working code on your local computer is only half the job of a software engineer. Professional engineering teams judge candidates by their ability to collaborate in distributed version control systems, adhere to clean commit conventions, and maintain automated Continuous Integration and Continuous Deployment (CI/CD) pipelines.

In this guide, we break down production Git practices and GitHub Actions workflows taught at PRAYXIS.


1. Branching Strategies: GitFlow vs Trunk-Based Development

  • •Legacy GitFlow: Uses long-lived develop, release, and feature branches. Often leads to grueling "merge hell" when features diverge for weeks.
  • •Trunk-Based Development (Modern Industry Standard):
  • • - All engineers merge small, frequent updates directly into a single shared main branch (the "trunk") multiple times per day.
  • • - Features that take multiple days to build are guarded behind Feature Flags rather than isolated on stale branches.
  • • - Eliminates massive merge conflicts and ensures continuous deployment velocity.

2. Maintaining a Clean Commit History with Interactive Rebase

A repository's git log is an architectural document. Commits like fix typo, test, or asdf should never pollute the shared history.

Before submitting a Pull Request, squash messy local checkpoint commits using interactive rebase:

# Rebase the last 4 commits interactively
git rebase -i HEAD~4

In the interactive editor, keep the first commit as pick and mark subsequent checkpoint commits as squash (or s):

pick 4a1b2c3 feat: implement dual-token JWT authentication
squash 8f9e0d1 fix cookie sameSite configuration
squash 2c3d4e5 add unit tests for token expiration
squash 7b8a9c0 update authentication error messages

3. Constructing an Automated GitHub Actions CI Pipeline

Continuous Integration automates code validation on every pull request. Below is a production GitHub Actions workflow file that runs linter checks, TypeScript compilation, and automated unit tests:

# .github/workflows/ci.yml
name: Continuous Integration

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  validate:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Source Code
        uses: actions/checkout@v4

      - name: Setup Node.js Runtime
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'

      - name: Install Dependencies
        run: npm ci

      - name: Run TypeScript Type Check
        run: npx tsc --noEmit

      - name: Run ESLint Linter
        run: npm run lint

      - name: Run Automated Test Suites
        run: npm test -- --coverage

4. Semantic Commit Conventions

Adopt Conventional Commits (type(scope): description) so changelogs can be generated automatically:

  • •feat(auth): Adding a new capability (e.g. feat(auth): add OTP email verification).
  • •fix(cart): Resolving a bug (e.g. fix(cart): prevent double charging on retry).
  • •perf(db): Performance improvements (e.g. perf(db): add compound index to submissions).
  • •docs(readme): Documentation adjustments.
  • •chore(deps): Updating package dependencies.

Capstone Portfolio Presentation Standards

When presenting your capstone project repository: 1. Include a comprehensive README.md featuring architectural diagrams and setup guides. 2. Provide a green GitHub Actions status badge showing that CI tests pass. 3. Keep commit histories atomic, descriptive, and clean.

Build verified capstone projects and collaborate in simulated software teams through the PRAYXIS Virtual Internship Programs.