cd to git-rootみたいなことしたい
code:sh
# change working directory (to root)
function cwd() {
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
cd
git rev-parse --show-toplevel
fi
}
便利〜〜〜
ref:
https://github.com/search?q=cd-git-root&type=code
#tech
#git