Sha256: 712c33534c38a2095f3915e938545b10a7a9d7517b5a5ae94cfa09ec5ca0511f
Contents?: true
Size: 335 Bytes
Versions: 27
Compression:
Stored size: 335 Bytes
Contents
#!/usr/bin/env ruby status = `git status` deleted_part = false status.split("\n").each do |line| if line =~ /Changed but not updated/ deleted_part ||= true end if deleted_part if line =~ /deleted: / filename = line.gsub("# deleted: ", "") puts filename system "git rm #{filename}" end end end
Version data entries
27 entries across 22 versions & 1 rubygems