Skip to content

Instantly share code, notes, and snippets.

@papaben
Last active December 17, 2015 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papaben/5624868 to your computer and use it in GitHub Desktop.
Save papaben/5624868 to your computer and use it in GitHub Desktop.
<?php
function resetToMaster()
{
$command = new \Bart\Shell\Command('git reset --hard %s/%s', 'origin', 'master');
try {
$command->run();
}
catch (\Bart\Shell\CommandException $e) {
echo "Problem resetting to master {$e->getMessage()}";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment