From 8dbf58387a00f0e34f250a1d4f6a2597d3040146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Wed, 16 Sep 2015 11:45:03 +0200 Subject: [PATCH] git: add alias that allows cd to the git-root --- modules/git/README.md | 4 ++++ modules/git/alias.zsh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/modules/git/README.md b/modules/git/README.md index c2d0449c..4e452d09 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -208,6 +208,10 @@ Aliases - `gwX` removes files from the working tree and from the index recursively and forcefully. +### Miscellaneous + + - `g..` change to the top-level directory of the current repository. + ### Shadows The following aliases may shadow system commands: diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index ffa854dd..ab219359 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -179,3 +179,6 @@ alias gwc='git clean -n' alias gwC='git clean -f' alias gwx='git rm -r' alias gwX='git rm -rf' + +# Miscellaneous +alias g..='cd $(git-root || echo ".")'