       repo.createBranch name, head, true
     .then (reference) ->
       ref = reference
-      console.log "checkout #{ref}"
+      console.log "branch checkout #{ref}"
       repo.checkoutBranch ref
     .then ->
       resolve ref

    repo = github.getRepo repoName
    repo.listPullRequests {state: 'open', head: "galtx-centex:#{head}"}
    .then (res) ->
      resolve res[0] ? null
    .catch (err) ->
      reject "PR #{err}"


    repo.getReference "origin/#{branch}"
    .then (reference) ->
      ref = reference
      console.log "ref checkout #{ref}"
      repo.checkoutRef ref
    .then () ->
      resolve ref
