github.com/jcarley/cli@v0.0.0-20180201210820-966d90434c30/commands/git/exists.go (about) 1 package git 2 3 import "os" 4 5 // Exists tells you whether or not a git repo exists in the current working 6 // directory. 7 func (g *SGit) Exists() bool { 8 if _, err := os.Stat(".git"); os.IsNotExist(err) { 9 return false 10 } 11 return true 12 }