You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It talks about how to specify amongst remote branches at checkout. Since you also dont support git checkout -b thats included as it's necessary to get teh right syntax.
If you change mainCommand->checkout to look like this:
public function checkout($ref, $createBranch = false, $refSource=null)
{
$this->clearAll();
and then change repository->checkout to look like:
public function checkout($ref, $createBranch = false, $refSource=null)
{
$this->caller->execute(MainCommand::getInstance()->checkout($ref, $createBranch, $refSource));
return $this;
}
This will allow a caller to specify a SPECIFIC source for their checkout (if the local branch does not already exist.), as well as specifying that they want a branch created.
The text was updated successfully, but these errors were encountered:
John-Schlick
changed the title
$repo->checkout can't specify amongst multiple remote branches.
$repo->checkout can't specify amongst multiple remote branches. (Solution code included)
Aug 5, 2014
Please see the article at:
http://makandracards.com/makandra/14323-git-how-to-check-out-branches-that-exist-on-multiple-remotes
It talks about how to specify amongst remote branches at checkout. Since you also dont support git checkout -b thats included as it's necessary to get teh right syntax.
If you change mainCommand->checkout to look like this:
public function checkout($ref, $createBranch = false, $refSource=null)
{
$this->clearAll();
and then change repository->checkout to look like:
public function checkout($ref, $createBranch = false, $refSource=null)
{
$this->caller->execute(MainCommand::getInstance()->checkout($ref, $createBranch, $refSource));
This will allow a caller to specify a SPECIFIC source for their checkout (if the local branch does not already exist.), as well as specifying that they want a branch created.
The text was updated successfully, but these errors were encountered: