diff options
Diffstat (limited to 'devbot/git.py')
-rw-r--r-- | devbot/git.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/devbot/git.py b/devbot/git.py index 55fd9f5..8db61d2 100644 --- a/devbot/git.py +++ b/devbot/git.py @@ -36,3 +36,13 @@ class Module: command.run(["git", "checkout", self.tag]) else: command.run(["git", "merge", "origin", self._branch]) + + def clean(self): + try: + os.chdir(self.local) + except OSError: + return False + + command.run(["git", "clean", "-fdx"]) + + return True |