kvz.io

Git

  • Published on
    Almost spring here! Birds are chirping and we start cleaning out our kitchens and backyards and closets and GitHub accounts. Let's trash some legacy! Why? Because - We're ashamed of old code - We want to save money by having a lower (private) repo count - We want to improve the signal-to-noise on our profiles before a job interview - Spring But wait, what if your co-worker wants to access some of those commits again? You probably don't feel like peeling archives from crashed backup drives in the basement of your previous building. Renan and I faced this at true.nl and we started looking for simple solutions.
  • Published on
    Despite testcases, syntax errors still find their way into our commits. - Maybe it was a change in that bash script that wasn't covered by tests. Too bad our deploys relied on it. - Maybe it was just a textual change and we didn't think it was necessary to run the associated code before pushing this upstream. Too bad we missed that quote. Whatever the reason, it's almost 2014 and we are still committing broken code. This needs to change because in the - Best case: Travis or Jenkins prevent those errors from hitting production and it's frustrating to go back and revert/redo that stuff. A waste of your time and state of mind, as you already moved onto other things. - Worst case: your error goes unnoticed and hits production. Git offers commit hooks to prevent bad code from entering the repository, but you have to install them on a local per-project basis. Chances are you have been too busy/lazy and never took the time/effort to whip up a commit hook that could deal with all your projects and programming languages. That holds true for me, however I recently had some free time and decided to invest it in cooking up ochtra. One Commit Hook To Rule All.
  • Published on
    When migrating projects over to GitHub, I found there were still some passwords inside my SVN repositories. Obviously it's not good practice to store your passwords in a code repository - let alone at a remote location, so I wanted to replace all passwords. Not only in the current version, but in all commits that have been made over the past 3 years. Luckily with Git - you can.