dotfiles/.local/bin/scripts/git-fork

12 lines
273 B
Bash
Executable File

#!/bin/sh
# Clones a fork and sets a corresponding upstream
# Args:
# - repo name
# - upstream user
# - local user
# - target directory name
set -e
git-get github.com "$1" "$3" "${@:4}"
test "$2" && git remote add upstream "$(gitremote github.com "$1" "$2")"
git remote -v