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"
|
if type -q "lazygit"
|
||||||
abbr -a lg lazygit
|
abbr -a lg lazygit
|
||||||
end
|
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
|
# doctrine
|
||||||
abbr -a scme sc make:entity
|
abbr -a scme sc make:entity
|
||||||
|
Reference in New Issue
Block a user