mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-07 08:52:35 +00:00
fix: ensure newly created branches are available for switching (#511)
Fixed an issue where the "Change Branch" button didn't work when switching to a newly created remote branch after initially cloning the repository. Added `git fetch origin` to update branch references before switching.
This commit is contained in:
@ -39,4 +39,18 @@ public function checkout(Site $site): void
|
||||
$site->id
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function fetchOrigin(Site $site): void
|
||||
{
|
||||
$site->server->ssh($site->user)->exec(
|
||||
view('ssh.git.fetch-origin', [
|
||||
'path' => $site->path,
|
||||
]),
|
||||
'fetch-origin',
|
||||
$site->id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user