Create deltagit.sh
This commit is contained in:
parent
a1d2d9d88f
commit
f771f86e7f
11
bash/deltagit.sh
Normal file
11
bash/deltagit.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
folders=( $1/*/ )
|
||||||
|
repo="$2"
|
||||||
|
|
||||||
|
declare -p folders
|
||||||
|
for folder in ${folders[@]}; do
|
||||||
|
rm -r $repo/*;
|
||||||
|
cp -r $folder/* $repo
|
||||||
|
git --work-tree=$repo --git-dir=$repo/.git add .;
|
||||||
|
git --work-tree=$repo --git-dir=$repo/.git commit -m "$folder";
|
||||||
|
done;
|
Loading…
Reference in New Issue
Block a user