Skip to content

Commit

Permalink
remove any references that not exist on the remote
Browse files Browse the repository at this point in the history
Before fetching, remove any remote-tracking references that no longer exist on the remote.
@see https://git-scm.com/docs/git-fetch
  • Loading branch information
fredyj authored Jul 26, 2016
1 parent 930fc55 commit ef0d938
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function getBranchList() {
// 应该先更新,不然在remote git删除当前选中的分支后,获取分支列表会失败
$this->updateRepo('master', $destination);
$cmd[] = sprintf('cd %s ', $destination);
$cmd[] = '/usr/bin/env git fetch -p';
$cmd[] = '/usr/bin/env git pull -a';
$cmd[] = '/usr/bin/env git branch -a';
$command = join(' && ', $cmd);
Expand Down

0 comments on commit ef0d938

Please sign in to comment.