Make sure we checkout the correct branch, if the repo exists locally
import os
import shutil
import subprocess
-import yaml
from dogen.tools import Tools, Chdir
from dogen.plugin import Plugin
@@ -113,6 +112,7 @@ class Git(object):
with Chdir(self.output):
self.log.info("Pulling latest changes in repo %s..." % self.repo)
subprocess.check_output(["git", "fetch"])
+ subprocess.check_output(["git", "checkout", "-f", self.branch])
subprocess.check_output(["git", "reset", "--hard", "origin/%s" % self.branch])
self.log.debug("Changes pulled")
else:
