isgitrepo 122 B

12345
  1. #!/bin/bash
  2. # Return 0 if you are in a git repo
  3. # Return 1 otherwise
  4. git rev-parse --is-inside-work-tree > /dev/null 2>&1