Category Archives: pairing

GitFlow hmmmm

After reading Atlassian worflow comparison and Vincent Driessen original post about GitFlow I have come to realise a couple of worrying things:

  • I incorrectly assumed GitFlow was the same thing as GitHub flow (fork project, do work then pull request)
  • This model appears to be popular but it seems totally archaic to me
    • Requires lots of merging especially if you refactor at lot.
    • Doesn’t do CD
    • Requires lots of manual work
    • Master and develop seem the wrong way around to me
    • How many branches?
  • I use pull requests but don’t use feature branches which the Atlassian article implies requires feature branches
  • Most places I’ve seen, feature branches do live on origin (unlike the original post)

GitHub flow is so nearly right except for the last two steps are the wrong way round (Deploy then Merge!):

Now that your changes have been verified in production, it is time to merge your code into the master branch.

This is my prefered workflow:

  • Master is always trunk or head where all new development happens
  • Every single check-in triggers a build (and tag with auto increment minor version) and is expected to be production code
    • If possible every build is automatically released but if not then a single click by an authorised user would make that release public
  • If old major versions are supported by team they are on branches (but the rest is the same, i.e every check is a release etc)
  • Hot fixes are just another commit to either master or the branch. i.e nothing special
  • Done means in production and you have monitored it with your own eyes! You don’t start new work until you have seen your old work live
  • If you are on the core team:
    • If you pair you can commit to master or branch directly
    • If you solo you should get code review or pull request
  • If you are not on core team you pull request from your fork

Is it just me that thinks GitFlow doesn’t look very “flow” based, more like a lot of manual busy work like the old days. Please report your counter experiences or alternate workflows…

Pairing with Resharper (Switching Keyboard Layouts in Visual Studio)

So at my current client we have a bunch of Devs that are fairly recent converts to Resharper and a bunch of old hats who know IntelliJ or have used Resharper since Version 1. We are pairing but we know different keyboard layouts and don’t want to decrease productivity by making one lot relearn the other layout. So with some searching around I found out how to create new layouts and using a simple macro switch between them. 

Please see attached zip

References:

An Example Visual Studio Keyboard settings file

Programatically changing the keyboard thread

MSDN Reference for binding keys in Visual Studio

 

What does it do?

Allow you to switch between “Resharper + Visual Studio” and IntelliJ shortcuts

 

Why would you do that?

You are pairing with someone who knows the other set of shortcuts

 

How to install?

  • Close Visual Studio
  • Run install.cmd from a drive (mapped if a network share) to copy the files to the default locations
  • Open Visual Studio
  • Tools – Macros – Load Macros Project… Select the ThoughtWorks folder Select the ThoughtWorks Project
  • Tools –  Options – Environment – Keyboard: Select the Resharper or IntelliJ

 

How to switch?

  • To switch to IntelliJ Layout press Ctrl-Shift-Alt-I
  • To switch to Resharper 4 Layout press Ctrl-Shift-Alt-R

It still does not work…

  • Tools – Options – Environment – Keyboard: Select the IntelliJ
  • Tools – Import and Export Settings… – Import selected environment settings – No, just import new settings – Browse – Select Switch.Shortcuts
  • Tools – Options – Environment – Keyboard: Select the Resharper
  • Tools – Import and Export Settings… – Import selected environment settings – No, just import new settings – Browse – Select Switch.Shortcuts

 

Can’t you create a decent installer?

I plan to but it looks like I might need to get my code signed by MS!