Permalink
Browse files

clean repository from untracked files

  • Loading branch information...
1 parent ee4ee36 commit a56ce02e8966af2c32956e144c1b9e314f6e5385 @dr4Ke committed Jan 21, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 0.11/tracgitosis/tracgitosis.py
@@ -353,6 +353,12 @@ def gitpull(path):
stdout, stderr = proc.communicate()
status = proc.returncode
if status == 0:
+ # Clean repository
+ cmd = ['git', 'clean', '-f']
+ proc = Popen(cmd, shell=False, stdin=None, stdout=PIPE, stderr=PIPE, cwd=path)
+ stdout, stderr = proc.communicate()
+ status = proc.returncode
+ if status == 0:
# Update the repository
cmd = ['git', 'pull']
proc = Popen(cmd, shell=False, stdin=None, stdout=PIPE, stderr=PIPE, cwd=path)

0 comments on commit a56ce02

Please sign in to comment.