Created
April 5, 2017 11:20
-
-
Save giljulio/1f0e6e3e3b0b3f233ad7734502c1004a to your computer and use it in GitHub Desktop.
Git move directory
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
#!/bin/sh | |
from="$1" | |
to="$2" | |
echo "Git moving files from $from to $to" | |
mkdir $to | |
for entry in "$search_dir"./"$from"/* | |
do | |
echo "Moving file $from/${entry##*/} to $to/${entry##*/}" | |
git mv $from/${entry##*/} $to/${entry##*/} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment