Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ Git.prototype.fetch = function(remote) {
* @return {Promise} A promise.
*/
Git.prototype.checkout = function(remote, branch) {
const treeish = remote + '/' + branch;
return this.exec('ls-remote', '--exit-code', '.', treeish).then(
const treeish = 'remotes/' + remote + '/' + branch;
return this.exec('ls-remote', '--refs', '--exit-code', '.', treeish).then(
() => {
// branch exists on remote, hard reset
return this.exec('checkout', branch)
Expand Down