-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Breaks After Deleting the gh-pages Branch #349
Comments
This logic already exists, but it's a little bit broken. Git.prototype.checkout = function(remote, branch) {
const treeish = remote + '/' + branch;
return this.exec('ls-remote', '--exit-code', '.', treeish).then(
() => {
// branch exists on remote, hard reset
return this.exec('checkout', branch)
.then(() => this.clean())
.then(() => this.reset(remote, branch));
},
error => {
if (error instanceof ProcessError && error.code === 2) {
// branch doesn't exist, create an orphan
return this.exec('checkout', '--orphan', branch);
} else {
// unhandled error
throw error;
}
}
);
};
Mentioned error is related to |
@JimLynchCodes - do you recall what you did to delete the branch? Something like |
I had the same issue and used |
Related to #17 ? |
Hi, I was pushing and my code was not being updated so out of frustration I deleted the entire gh-pages branch.
Now the gh-pages command doesn't work at all...
I would expect it to just re-create the
gh-pages
branch as I did when I ran the command for the first time...The text was updated successfully, but these errors were encountered: