diff options
author | Torben <torben.letorbi@gmail.com> | 2016-07-08 13:53:29 +0200 |
---|---|---|
committer | Torben <torben.letorbi@gmail.com> | 2016-07-08 13:53:29 +0200 |
commit | 84c9cbc1533dab6ba67ece85f9fb371435681918 (patch) | |
tree | 413aa6568a407e6e1c7a6118b763c0f593d007cb /gitautodeploy/wrappers/git.py | |
parent | 2e385528f8ea5c6b8b6ea2672c80a4778008479a (diff) | |
download | Git-Auto-Deploy-84c9cbc1533dab6ba67ece85f9fb371435681918.zip Git-Auto-Deploy-84c9cbc1533dab6ba67ece85f9fb371435681918.tar.gz Git-Auto-Deploy-84c9cbc1533dab6ba67ece85f9fb371435681918.tar.bz2 |
Use forced checkout instead of fetch+reset for 'pulling' repository
Diffstat (limited to 'gitautodeploy/wrappers/git.py')
-rw-r--r-- | gitautodeploy/wrappers/git.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gitautodeploy/wrappers/git.py b/gitautodeploy/wrappers/git.py index e600d9e..3b1bd45 100644 --- a/gitautodeploy/wrappers/git.py +++ b/gitautodeploy/wrappers/git.py @@ -30,8 +30,7 @@ class GitWrapper(): else: commands.append('unset GIT_DIR') - commands.append('git fetch ' + repo_config['remote']) - commands.append('git reset --hard ' + repo_config['remote'] + '/' + repo_config['branch']) + commands.append('git checkout -f -B ' + repo_config['branch'] + ' -t ' + repo_config['remote'] + '/' + repo_config['branch']) commands.append('git submodule update --init --recursive') #commands.append('git update-index --refresh') |