1 2 3 4 5
#!/bin/sh root="$(git rev-parse --show-toplevel)" cd "$root" || exit 1 file="${root##*/}".tar.gz tar czf "$file" $(git ls-files)