all repos — dotfiles @ ac2d5913500f710415f7ed1ba74c38ee96693ed8

my *nix dotfiles

bash: add gco function
Anirudh Oppiliappan x@icyphox.sh
Tue, 15 Feb 2022 15:48:19 +0530
commit

ac2d5913500f710415f7ed1ba74c38ee96693ed8

parent

f713de8850ef33ed54eb44bbec2af3fd797ad8b7

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M bash/.bashrc.d/90-aliases.bashbash/.bashrc.d/90-aliases.bash

@@ -39,6 +39,17 @@ gpm() {

git pull -r origin master } +gco() { + [[ "$1" == "" ]] && return 1 + + git rev-parse --verify "$1" &> /dev/null + if [ $? -eq 0 ]; then + git checkout "$1" + else + git checkout -b "$1" + fi +} + ls() { case "$OSTYPE" in "darwin"*)