Skip to content

Commit

Permalink
reset && checkout => reset --hard
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuiyong committed Nov 17, 2015
1 parent a710f85 commit 5331835
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public function updateToVersion($task) {
$destination = Project::getDeployWorkspace($task->link_id);
$this->updateRepo($task->branch, $destination);
$cmd[] = sprintf('cd %s ', $destination);
$cmd[] = sprintf('/usr/bin/env git reset -q %s', $task->commit_id);
$cmd[] = '/usr/bin/env git checkout -q .';
$cmd[] = sprintf('/usr/bin/env git reset -q --hard %s', $task->commit_id);
$command = join(' && ', $cmd);

return $this->runLocalCommand($command);
Expand Down

0 comments on commit 5331835

Please sign in to comment.