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

12 lines
273 B
Plaintext
Raw Normal View History

2021-06-19 19:24:14 +00:00
#!/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