Adding cd git root command

This commit is contained in:
Bryan Ramos 2023-06-02 13:58:30 -04:00
parent 2dd137dbf5
commit 5c8b6706a1

View file

@ -87,6 +87,17 @@ fi
# Custom Functions
##
# CD to Git root
function cdg() {
local root
root=$(git rev-parse --show-toplevel 2> /dev/null)
if [[ -n $root ]]; then
cd $root
else
echo "Not a git repo"
fi
}
# penpot {run|stop|update|help} alias function
function penpot() {
case "$1" in