If you’re using Dropbox and would like to store Git repos in your Dropbox folder, this tool is useful: This CLI shell script aims to take advantage of glob patterns and existing .gitignore files in order to exclude specific folders and files from dropbox sync. Never sync node_modules or vendor to Dropbox again! dropboxignore →
Tag Archives: git
Multiple Accounts and Git
If you have multiple accounts to use with Git — such as a personal and a work account — you can have your Git Config (typically ~/.gitconfig) conditionally include other configs depending on the folder you’re working in. In those extra configs you then can override some settings. Here’s an example ~/.gitconfig that has two …
Keep calm and Git bisect
Ever saw your code break and don’t know when exactly the bug was introduced? Zvonimir Spajic walks us through git bisect to find the commit that broke things. I’ve used it myself quite a few times by now and it truly is really helpful in those situations. What I didn’t know however, is that it’s …
Speed up build times with this little Git trick
When building applications on build pipelines like GitHub Actions, Google Cloud Build, CircleCI, etc. every second counts. Here’s this small trick I use to speed up build times: when cloning the repo from its Git source, I instruct Git to do a shallow clone of the single branch it is building. 💡 If you’re running …
Continue reading “Speed up build times with this little Git trick”
Visualizing Git Concepts with D3
Understanding Git: Dispelling the magic of git merge
If you’ve ever wondered how Git internally manages commits and merges, Zvonimir Spajic (@konrad_126) has got you covered: Creating branches in git is blazingly fast and having a bunch of them is pretty cheap. This means we get to merge them quite often. But how is a branch represented internally and what does it mean …
Continue reading “Understanding Git: Dispelling the magic of git merge”
Parse the output of git log
using PHP
The git pickaxe – Find commits that added/removed a specific string
On his blog, Philip Potter described something he calls “the git pickaxe”, a way to finding commits that contained a specific word. It uses git log‘s -S option to search for specific string: -S<string> Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file. Intended for the …
Continue reading “The git pickaxe – Find commits that added/removed a specific string”