Archive for the ‘Git’ Category

Git workflow scripts

We use a couple of scripts derived from these as part of our Git workflow. We added functions that 1) prevent you from getting latest if you have uncommitted changes, 2) remind you to work in a feature branch, and 3) automatically determine the remote branch associated with the current feature branch, etc.

The scripts are now available from our git repo.


Name the scripts hack.sh and ship.sh and put them in your bash bin directory (e.g. C:\Users\USERNAME\bin). Then use them from the bash command line after you checkin. For example:

git add .
git commit -am"fixed bug #..."

If you always work in a feature branch and rebase your changes onto the remote branch (using hack and ship), then bisect and blame work as intended and your git repo will look something like this (3 developers):

From blog images

If you merge your changes, however, then bisect and blame may not be particularly useful in helping you determine when a change was introduced. And your checkins may come to look like this:

From blog images

Read Full Post »

%d bloggers like this: