Skip to content

Instantly share code, notes, and snippets.

@drmohundro
Created March 11, 2016 21:46
Show Gist options
  • Save drmohundro/0ca95fd7d5065b52723d to your computer and use it in GitHub Desktop.
Save drmohundro/0ca95fd7d5065b52723d to your computer and use it in GitHub Desktop.
Fix git casing issues across all directories
# can just run this in pry
files = `git ls-files | grep Wrongcase`
files.split("\n").each { |file| system("git mv #{file} #{file.gsub('Wrongcase', 'WrongCase')}") }
@drmohundro
Copy link
Author

I ran this to fix a repository that was set up in Windows (which is case-insensitive).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment