diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GitHubPagesDeploy/GitHubPagesDeploy.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/GitHubPagesDeploy/GitHubPagesDeploy.php b/src/GitHubPagesDeploy/GitHubPagesDeploy.php index c7f1a17..34c31d4 100644 --- a/src/GitHubPagesDeploy/GitHubPagesDeploy.php +++ b/src/GitHubPagesDeploy/GitHubPagesDeploy.php @@ -41,8 +41,17 @@ class GitHubPagesDeploy $git = new GitWorkingCopy($wrapper, $dir); } + // Remove any local changes. + $git->reset(array('hard' => true)); + + // Ensure we are on the correct branch. $git->checkout('gh-pages'); + + // Pull in any changes. $git->pull(); + + // Ensure there aren't any local changes. + $git->reset(array('hard' => true)); } } |