lib/dply/git.rb in dply-0.0.5 vs lib/dply/git.rb in dply-0.0.7

- old
+ new

@@ -21,9 +21,14 @@ def self.clone(repo, dir, mirror: nil) cmd "git clone #{repo} #{dir}" end + def self.clean + cmd "git reset --hard HEAD" + cmd "git clean -dxf " + end + def self.get_tracking_branch(branch) command = "git for-each-ref --format='%(upstream:short)' refs/heads/#{branch} --count=1" tracking_branch = `#{command}` if tracking_branch =~ /[a-zA-Z0-9_]/ return tracking_branch.chomp!