Skip to content

Commit f11ac9e

Browse files
committed
Add alias to jump to repo root
1 parent fbd2f30 commit f11ac9e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

home/dot_aliases.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ alias git-prune-all="git fetch --all && git remote prune origin && git branch -v
88
new-branch() {
99
git checkout -b "{{ .gitBranchPrefix }}$1"
1010
}
11+
12+
cdgroot() {
13+
local dir="$(git rev-parse --show-toplevel)"
14+
[[ -n "$dir" ]] && cd "$dir"
15+
}

0 commit comments

Comments
 (0)