git-add-remotes() { # Add remotes git remote add origin gitea@git.gabbott.dev:george/$1.git git remote add github git@github.com:GeorgeAbbott/$1.git git remote add gitlab git@gitlab.com:GeorgeAbbott/$1.git } git-rename-remotes() { # Rename all remotes git remote set-url origin gitea@git.gabbott.dev:george/$1.git git remote set-url github git@github.com:GeorgeAbbott/$1.git git remote set-url gitlab git@gitlab.com:GeorgeAbbott/$1.git } git-print-remotes() { # Print all remotes git remote get-url origin git remote get-url github git remote get-url gitlab } git-clone-add-remotes() { # Git clone from origin url and then add in the rest of remotes git clone gitea@git.gabbott.dev:george/$1.git cd ./$1 gar $1 cd .. } git-update-all() { # Update all - recursively iterates through dir and runs git pull # TODO implement } # Git aliases abbrev-alias gb="git branch" abbrev-alias grm="git rm" abbrev-alias gmv="git mv" abbrev-alias gco="git checkout" abbrev-alias gcom="git checkout master" abbrev-alias gbd="git branch -d" abbrev-alias gp="git push" abbrev-alias gpa="git-push-all" abbrev-alias gpl="git pull" abbrev-alias gs="git status" abbrev-alias ga="git add" abbrev-alias gc="git commit" abbrev-alias gcm="git commit -m" abbrev-alias gf="git fetch" abbrev-alias gcl="git clone" abbrev-alias gar="git-add-remotes" abbrev-alias grr="git-rename-remotes" abbrev-alias gpr="git-print-remotes" abbrev-alias gcr="git-clone-add-remotes" abbrev-alias gua="git-update-all"