-
-
Notifications
You must be signed in to change notification settings - Fork 320
Posible bug on .checkout(checkoutWhat [, options]) #873
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
There is two equivalent way to checkout
You can also see this post #501 (comment) for more information. |
Hello, there are separate methods for checking out a branch. Please switch to either simpleGit(). checkoutLocalBranch('PAY-XXXXX'); // git checkout -b PAY-XXXXX
simpleGit(). checkoutBranch('PAY-XXXXX', 'origin/PAY-XXXXX'); // git checkout -b PAY-XXXXX origin/PAY-XXXXX Docs for this can be found at https://github.com/steveukx/git-js#git-checkout |
@Bill2015, yea that's what I'm doing right now. ( @steveukx , thanks for the tip, I show it, but the thing is that I want to do a |
Ah thank you for the clarification on the I will have a look at switching the simpleGit().raw('checkout', '-B', 'PAY-XXXXX'); |
Thanks @steveukx 👍. Just for clarification, |
…hen using `checkoutBranch` / `checkoutLocalBranch`. Based on requirement detailed in #873
If I try to use a
checkout
passing a branch and an array of options like:simpleGit().checkout('PAY-XXXXX' ,[ '-B'])
I got an error saying:
It looks like we are trying to do:
git checkout PAY-XXXXX -B
but parameter should be set before the branch name like:
git checkout -B PAY-XXXXX
The text was updated successfully, but these errors were encountered: