The message Already on 'master' is sent to the Error Stream, whereas Process.text returns the output from the Output Stream...
You can do this sort of thing:
new StringWriter().with { sw ->
'git checkout master'.execute().with { proc ->
consumeProcessOutput( sw, sw )
proc.waitFor()
}
println sw.toString()
}
To send both the output and error streams to a StringWriter, then print out it's contents
Tim