A developer playbook for professional version control and automation. Learn how to manage trunk-based branches, resolve rebase conflicts, configure secure SSH keys, and write YAML pipelines.
In software engineering, version control is the baseline of team collaboration. Mastering Git CLI, understanding branching topologies, and automating deployment loops using GitHub workflows are mandatory requirements for any professional developer.
Three main branching styles dominate production engineering:
main, develop, release/*, feature/*, hotfix/*). Great for scheduled releases.main, feature/*). Feature branches are merged into main after pull request reviews.main), using feature flags to disable untested code paths.Trunk-based:
──[main]─────●──────────●──────────●───
\ / /
└[feat]┘ └[feat2]┘
Rebasing updates your branch with target commits by placing your active commits on top of the branch tip:
git checkout feature/api
git rebase main
If a conflict occurs:
<<<<<<<) and incoming changes (>>>>>>>).git add file.js
git rebase --continue
SSH offers passwordless, secure access keys. To generate an SSH key using the Ed25519 algorithm:
ssh-keygen -t ed25519 -C "your_email@example.com"
Start the ssh-agent and load your key:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Copy the public key content and add it inside your GitHub Account Settings:
cat ~/.ssh/id_ed25519.pub
GitHub Actions run automated workloads triggered by branch updates. Workflows are defined inside .github/workflows/ using YAML configuration:
# .github/workflows/ci.yml
name: Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Setup NodeJS Environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Test Suite
run: npm run test
- name: Verify Bundle Compilation
run: npm run build
This workflow runs quality checks automatically on every pull request, safeguarding your main branch from compiler errors.