LoginSignup
49
45

More than 5 years have passed since last update.

Gitのルートディレクトリへ簡単に移動できるようにする関数

Last updated at Posted at 2012-03-16
.zshrc
function git-root() {
  if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
    cd `pwd`/`git rev-parse --show-cdup`
  fi
}
49
45
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
49
45