From 91c41d33cbce6055ac17972b9d9e07d54cba183c Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Thu, 23 Jul 2020 07:32:35 +0200 Subject: [PATCH] improve my fork workflow - always go to new copy of the cloned repository after forking it - always set the local repo user config after the fork - always check for spelling mistakes in the forked repo readme files just in case --- dot_zsh_functions | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dot_zsh_functions b/dot_zsh_functions index 73cfc04..053806d 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -559,10 +559,15 @@ function clone() { fi } function fork() { - # FIXME : go to local copy of the repo after the fork - code + code || exit local folder=$(basename $1 | sed 's/\.git.*//g') - gh repo fork "$1" + gh repo fork "$1" --clone && cd "$folder" + if [[ "$1:u" =~ "$COMPANY_NAME:u" ]]; then + gitpro + else + gitperso + fi + checkenlist README* } function git-project() { if [ -d "$REPO_PATH" ]; then