git: add alias that allows cd to the git-root

This commit is contained in:
Cenk Gündoğan 2015-09-16 11:45:03 +02:00
parent f2a826e963
commit 8dbf58387a
2 changed files with 7 additions and 0 deletions

View file

@ -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:

View file

@ -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 ".")'