greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
182 stars 73 forks source link

update.js fails with multiple origins #233

Closed baer95 closed 5 years ago

baer95 commented 5 years ago

I am seeing the following error:

error: pathspec 'master' did not match any file(s) known to git.

in this line: https://github.com/greenkeeperio/greenkeeper-lockfile/blob/master/lib/git-helpers.js#L47

As explained in https://stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn#comment38395576_7334027, the default value for defaultBranch should therefore not be master but origin/master.

As a workaround the environment-variable GK_LOCK_DEFAULT_BRANCH can be set to origin/master.