Semantic versioning (SemVer) is a standard for defining the version numbers. A version number consists of three numbers separated by periods (X.Y.Z). The type of change being introduced (e.g. a new feature or a change that breaks backwards compatibility) determines which numbers are incremented.
Recommendations
Writing Posts with CLI Commands
A lot of the posts I write include command-line interface (CLI) commands to type in. I’ve found over time there are things I can do to improve how these commands are communicated.
Should I add .env to .gitignore?
The short answer is, “yes”. You should use your .gitignore file to ignore the .env file.
.gitignore Hidden Files with Exceptions
In most operating systems by default, files that start with a period (.) are hidden. When setting up my .gitignore file, I like to ignore all these hidden files (with a few exceptions).
Starter .gitignore file
This is my general starter .gitignore file for projects. I have a separate .gitignore for WordPress websites.
Writing Good Commit Messages is the Wrong Place to Start
I’m a big fan of Git and I’ve worked with lost of developers in growing their Git skills. Often developers learning Git, start by learning how to write a “good” commit message. While writing “good” commit messages is an important skill, in my opinion it is the wrong place to start.
Rules for Writing Git Commit Messages
These are the rules I follow when writing Git commit messages. I’ve found these serve me well and are compatible with most projects I work on (if a project has a specific set of rules for writing Git commit messages, those would override any rules I’ve outlined here).
Add git status to zsh prompt
One of the things that made me much better at Git was making my current branch (and whether or not I have any changed files) always visible. By default zsh includes everything you need to do this, you just need to configure it.
Git warning: Pulling without specifying how to reconcile divergent branches is discouraged
When using Git version 2.27.0 or higher running the command ‘git pull’ will display, “warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull”.
Why __() needs a hardcoded string in WordPress
When using a WordPress translation function, e.g. __(), you need to use a hardcoded string (not a variable).