#!/bin/bash function copyRepo() { local dir="${BASH_SOURCE%/*}/.."; local target="$1"; git clone "$dir" "$target"; git -C "$dir" diff HEAD | git -C "$target" apply --allow-empty; git -C "$dir" ls-files --exclude-standard --others | \ while read file; do cp "$dir/$file" "$target/$file"; done; } copyRepo "$@";