Created
August 29, 2019 13:23
-
-
Save makiftutuncu/eca358023f6b75e3b82a72652bc28535 to your computer and use it in GitHub Desktop.
Rename Package and Keep History
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
git filter-branch -f --prune-empty --tree-filter ' | |
find . \ | |
-name .git -prune -o \ | |
-exec sh -c "file {} | grep -q text" \; \ | |
-exec sed -i "" \ | |
-e "s/X/Y/g" \ | |
-e "s/com.x.y/com.github.makiftutuncu.trump/g" \ | |
-e "s/x/y/g" \ | |
{} \; \ | |
&& mkdir -p src/main/scala/com/github/makiftutuncu/trump && mkdir -p src/test/scala/com/github/makiftutuncu/trump && tree src && mv src/main/scala/com/x/y/* src/main/scala/com/github/makiftutuncu/trump && mv src/test/scala/com/x/y/* src/test/scala/com/github/makiftutuncu/trump && tree src | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment