Historically, when trying to track down a bug in my code I spent a lot of time trying to determine exactly where the bug appears in the code. On all of my projects I use Git for version control. Knowing exactly which commit introduced the bug helps me track down the bug. Git bisect is […]
By default the output of ‘git log’ is not nearly as useful as it could be. By creating a new command ‘git lg’ that uses some of the options available to ‘git log’, we create a much more useful command.
While working with a client recently, I found that deploying to WP Engine with Git had stopped working. The Symptom The following appeared on the command line when I ran git push production remote: – warning: syntax Error Found in wp-content/vendor/composer/autoload_static.php … remote: – failed: we detected a PHP syntax failure. The Problem The file […]
One can rename a file with git mv however, if you try to use this technique to change the case of the filename it will fail and you’ll get fatal: destination exists. I prefer to keep all my filenames lowercase, so getting this to work is important to me. If I modified the filename case […]
Why to Setup Your Git Submodules as https:// not ssh I was pulling a public GitHub repo the other day which featured submodules. The frustrating problem is whenever I tried to init the submodules with the line git submodule update –init –recursive I got the error Git Submodule fatal: Could not read from remote repository […]
That is Not What I Meant to Commit It seems no matter how many times I do git status, I still managed to sneak in a completely wrong commit sometimes. Additionally, I never remember how to undo a commit so I end up googling “undo git commit” and I get way more information than I […]
I’ve been using both Git and Sass for some time now. These two tools have had a huge positive impact on my development. The issue that arises when combining Git and Sass is when checking in compiled CSS, it is common to get conflicts with other contributors on the Git repository. Don’t Check in Your […]