Skip to content

Instantly share code, notes, and snippets.

Created March 11, 2016 21:46
What would you like to do?
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')}") }
Copy link

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