Add cd to git root (cdg)
This commit is contained in:
@ -21,6 +21,14 @@ abbr -a gaa git add -A
|
||||
if type -q "lazygit"
|
||||
abbr -a lg lazygit
|
||||
end
|
||||
function cdg
|
||||
set git_root (git rev-parse --show-toplevel 2>/dev/null)
|
||||
if test -d $git_root
|
||||
cd $git_root
|
||||
else
|
||||
echo "Not inside a Git repository."
|
||||
end
|
||||
end
|
||||
|
||||
# doctrine
|
||||
abbr -a scme sc make:entity
|
||||
|
Reference in New Issue
Block a user