git: Change gco to git checkout

It happens too often that you want to `gco` a specific commit or tag for
switch to always be useful in every scenario with the shortcut.
This commit is contained in:
Marty Oehme 2021-12-04 11:23:03 +01:00
parent d78a27582c
commit 23be9c64c9
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -24,13 +24,12 @@ if version_at_least 2.23 "$git_version"; then
alias gcm='git switch master 2>/dev/null || git switch main' alias gcm='git switch master 2>/dev/null || git switch main'
alias gcd='git switch develop' alias gcd='git switch develop'
alias gcb='git switch -c' alias gcb='git switch -c'
alias gco='git switch'
else else
alias gcm='git checkout master 2>/dev/null || git checkout main' alias gcm='git checkout master 2>/dev/null || git checkout main'
alias gcd='git checkout develop' alias gcd='git checkout develop'
alias gcb='git checkout -b' alias gcb='git checkout -b'
alias gco='git checkout'
fi fi
alias gco='git checkout'
alias gd='git diff' alias gd='git diff'
alias gds='git diff --staged' alias gds='git diff --staged'