Git for Windows SDK 便利。zsh にして更に便利。と思ってたのに git stash したら
$ git --version git version 2.9.0.windows.1 $ git stash D:\develop\git-sdk-64\mingw64/libexec/git-core\git-stash: 183: cd: can't cd to C:/hoge/fuga Cannot chdir to C:/hoge/fuga, the toplevel of the working tree
とメッセージが出て stash できない。
git-sh-setup を編集したら stash できた。
cd_to_toplevel () {
- cdup=$(git rev-parse --show-toplevel) &&
+ cdup=$(git rev-parse --show-toplevel | sed -e 's/C:/\/C/') &&
cd "$cdup" || {
echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree"
exit 1
}
}
SDK じゃない git 2.8 がうごいてる Git Bash は stash できるのだけどなんなのかはよくわからない。