Tag: git
Git Rebase vs Merge
Merge preserves branch history with a merge commit — rebase rewrites commits onto the target branch for a linear history.
2mo ago
git intermediate
Conventional Commits Tooling
Automating semantic versioning and changelog generation from commit messages using commitizen, commitlint, standard-version, and semantic-release.
2mo ago
git intermediate
Git Blame & Archaeology
Using git blame, git log -S, and git bisect to trace when code was introduced, who wrote it, and which commit caused a bug — essential for debugging and context.
2mo ago
git intermediate
Git Hooks in PHP Workflow PHP 5.0+
Using pre-commit hooks to automatically run PHP-CS-Fixer, PHPStan, and security checks before every commit — preventing style violations and bugs from entering the repository.
2mo ago
style intermediate
Git LFS
Replaces large binary files with text pointers in git — keeping repository fast while storing actual binaries on a separate LFS server.
2mo ago
git intermediate
Three different ways to undo in git — revert creates a new undo commit (safe for shared branches), reset moves HEAD (rewrites history, dangerous on shared branches), restore undoes working directory changes.
2mo ago
git intermediate
Git Submodules & Monorepo Alternatives
Git submodules embed one repo inside another — complex to manage. Composer packages, git subtrees, and monorepos are better alternatives for most PHP projects.
2mo ago
git intermediate
Gitflow (feature/develop/release/main branches) vs Trunk-Based Development (short-lived branches merged to main daily) — TBD is preferred for CI/CD, Gitflow for release-based software.
2mo ago
git intermediate
GitHub Actions — Reusable Workflows & Matrices
Advanced GitHub Actions patterns — reusable workflow files, matrix strategies for parallel testing, composite actions, and environment protection rules.
2mo ago
git intermediate
Signed Commits & GPG Verification
Cryptographically signing commits with GPG or SSH keys proves the commit was made by the stated author — important for supply chain security and verifying commit integrity.
2mo ago
git intermediate
A binary search tool that finds the commit that introduced a bug by marking commits as good or bad — locating the culprit in O(log n) steps.
2mo ago
git intermediate
Applies the changes from a specific commit onto the current branch, creating a new commit with the same changes but a different hash.
2mo ago
git intermediate
Git Hooks
Scripts that run automatically at specific points in the git workflow — pre-commit for linting, pre-push for tests, commit-msg for message format enforcement.
2mo ago
git intermediate
A log of every position HEAD has pointed to — the safety net for recovering commits after a bad reset, rebase, or accidental branch deletion.
2mo ago
git intermediate
GitFlow uses long-lived feature and release branches; trunk-based development merges to main frequently — the latter scales better with CI/CD.
2mo ago
devops intermediate
Trunk-Based Development
All developers integrate small, frequent commits directly into a single shared branch (trunk/main), avoiding long-lived feature branches.
2mo ago
devops intermediate