Created
June 2, 2022 17:58
-
-
Save kodie/00e87acf9f1f5b10d308c4e5226e4ddc to your computer and use it in GitHub Desktop.
A bash function to lowercase file and directory names in a git repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git-lowercase-file { | |
tmp="tmp-$RANDOM-$1" | |
new=$(echo "$1" | tr '[:upper:]' '[:lower:]') | |
git mv -f $1 $tmp | |
git mv -f $tmp $new | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment