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

Version Path
ymdp-0.1.10 spec/data/script/gitrm
ymdp-0.1.9 spec/data/script/gitrm
ymdp-0.1.8.1 spec/data/script/gitrm
ymdp-0.1.8 spec/data/script/gitrm
ymdp-0.1.7 spec/data/script/gitrm
ymdp-0.1.6 spec/data/script/gitrm
ymdp-0.1.4 spec/data/script/gitrm
ymdp-0.1.4 lib/new_application/script/gitrm
ymdp-0.1.3.2 lib/new_application/script/gitrm
ymdp-0.1.3.2 spec/data/script/gitrm
ymdp-0.1.3.1 spec/data/script/gitrm
ymdp-0.1.3.1 lib/new_application/script/gitrm
ymdp-0.1.3 lib/new_application/script/gitrm
ymdp-0.1.3 spec/data/script/gitrm
ymdp-0.1.1 spec/data/script/gitrm
ymdp-0.1.1 lib/new_application/script/gitrm
ymdp-0.1.0 lib/new_application/script/gitrm
ymdp-0.0.17 lib/new_application/script/gitrm
ymdp-0.0.16 lib/new_application/script/gitrm
ymdp-0.0.15 lib/new_application/script/gitrm