git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| function pcolor() { | |
| red=$'\e[1;31m' | |
| grn=$'\e[1;32m' | |
| yel=$'\e[1;33m' | |
| blu=$'\e[1;34m' | |
| mag=$'\e[1;35m' | |
| cyn=$'\e[1;36m' | |
| end=$'\e[0m' | |
| printf "${!1}%-6s\n${end}" "$2" |
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| #!/usr/bin/env bash | |
| ################################################################################ | |
| # Boilerplate Shell Script with getopt parsing | |
| # | |
| # This script is released to the Public Domain by Chad Walstrom | |
| # Chad Walstrom <[email protected]>. | |
| ################################################################################ | |
| NOACT=0 | |
| NAME=$(basename $0|sed 's/\(\..*\)$//') | |
| VERSION="0.1" |