diff --git a/bash/deltagit.sh b/bash/deltagit.sh new file mode 100644 index 0000000..eec7b16 --- /dev/null +++ b/bash/deltagit.sh @@ -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;