How to Enable Git Tab Completion in Bash on Mac OS X

September 28th, 2015 | Conor Livingston | Development

I use git from the command line all day long. In the process, I issue a lot of git commands. This can get (no pun intended) to be a lot of repetitive typing, especially when branch names get long. To illustrate, it’s no fun to type out git checkout feature/shiny-new-processing-system-database-optimization every time I want to checkout that branch. Of course, you can always use the mouse to copy and paste a long branch name rather than typing the whole thing out.

However, if you’re like me and like to keep your hands on the keyboard, this solution can feel slow. Tab completion would certainly be faster and easier. Unfortunately, the default install of git on some Mac computers doesn’t have tab completion enabled. This was the case for me and at least two of my colleagues.

Fortunately, this is an easy fix. There is a bash script that enables tab completion of git commands and branch names. At the time of writing, this file exists in git’s official repo on Github. In fact, it is likely that this file already exists on your local machine, but, if you’re reading this post, you probably haven’t tapped into its power, yet. In the rest of this article, I will show you how to enable git tab completion in bash on a Mac.

The first step is to figure out whether you already have the git-completion script on your machine….

Read more

Test Automation for Embedded – Part 1

September 1st, 2015 | Bob Ensink | Development

Introduction

At SpinDance we use Agile methods when developing software for our customers. An essential element to this Agile approach is ‘Continuous Integration’. The practice of Continuous Integration requires developers to commit their code to a shared repository on a frequent, often daily, basis. The purpose is to integrate the changes from one developer with the very latest code from all the other developers on the same project. This practice allows us to measure whether the project is progressing (new features are working correctly) or regressing (completed features are no longer working). Successful integration happens only by passing these three steps:

  • conflicts among the code changes are resolved,
  • the software can be built without errors or warnings, and
  • the software passes all of its tests.

The first step is initiated by the developer who makes a decision that their code is ready to be submitted for integration. This developer is responsible to resolve all conflicts between their changes and the changes that other developers have made. It is, essentially, a manual process performed with the help of tools. It can be done effectively only in the context of a version control system which manages changes, detects conflicts, and requires that they be resolved before accepting the developer’s new code into the repository. Resolving these conflicts does not, however, guarantee a successful integration;…

Read more