feature: fn(x) for forking repos via github

This commit is contained in:
MorganGeek 2020-07-17 14:54:47 +02:00
parent fa938d9df5
commit b88a574495

View File

@ -483,9 +483,15 @@ function clone() {
error "unable to change current directory to : $folder" error "unable to change current directory to : $folder"
fi fi
else else
error "unable to clone repository url : $1" error "unable to clone repository from url : $1"
fi fi
} }
function fork() {
# FIXME : go to local copy of the repo after the fork
code
local folder=$(basename $1 | sed 's/\.git.*//g')
gh repo fork "$1"
}
function git-project() { function git-project() {
if [ -d "$REPO_PATH" ]; then if [ -d "$REPO_PATH" ]; then
REPO_PATH="$(pwd)" REPO_PATH="$(pwd)"