WordPress Developer Ukraine, Kyiv
git filter-repo: Removing Sensitive Files and Rewriting History

git filter-repo: Removing Sensitive Files and Rewriting History

git filter-repo: remove sensitive files from Git history A wp-config.php with production credentials, an .env file or a private key committed by accident does not go away with a new commit that deletes it: the file stays in every older commit, and anyone who clones the repository can get it. Removing it means rewriting the…
Git Sparse Index and Partial Clones for Large Monorepos

Git Sparse Index and Partial Clones for Large Monorepos

Partial clones and sparse checkout for large WordPress repositories A repository that holds a whole WordPress site, years of history and some committed media can reach several gigabytes. Cloning it for a one-line fix in one plugin downloads all of that. Git has two features to work with only part of a repository: a partial…
Conventional Commits and git-cliff: Automated WordPress Plugin Changelogs

Conventional Commits and git-cliff: Automated WordPress Plugin Changelog ...

Conventional Commits and git-cliff: a plugin changelog from the commit history The changelog in readme.txt is written at release time, from memory, and it shows: fixes are forgotten, internal refactorings are listed as features. If the commit messages follow a simple convention, a tool can sort them into “Features”, “Fixes” and “Breaking changes” and write…
Git Tags and Signed Releases for WordPress Plugins

Git Tags and Signed Releases for WordPress Plugins

Git tags and signed releases for a WordPress plugin A plugin release is a version number in three places (the plugin header, readme.txt‘s “Stable tag”, a constant in the code), a ZIP and, ideally, a tag in git that marks exactly which commit was released. When these drift apart, a support request for “version 2.4.1”…
git notes: Annotating Commits Without Rewriting History

git notes: Annotating Commits Without Rewriting History

git notes: add information to commits without rewriting history A commit is immutable: changing its message changes its hash and rewrites the history after it, which is not acceptable on a shared branch. Sometimes information arrives later: the commit was deployed to production at 14:22, the reviewer approved it, a test on PHP 8.3 failed.…