Skip to content

Instantly share code, notes, and snippets.

@timruffles
Created June 10, 2011 09:35
Show Gist options
  • Save timruffles/1018549 to your computer and use it in GitHub Desktop.
Save timruffles/1018549 to your computer and use it in GitHub Desktop.
convert filenames in git to lowercase
#!/usr/bin/ruby
STDIN.read.split("\n").each do |file|
file.gsub!("\n","")
cmd = <<-CMD
git mv #{file} #{file}~
git mv #{file}~ #{file.downcase}
CMD
unless file == file.downcase
`#{cmd}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment