def find_git_dir(path)
      path = Pathname.new(path).realpath
      while path.parent != path && !(path + ".git").directory?
        path = path.parent
      end
      
      path = path + ".git"
      
      raise "Could not find suitable .git dir in #{path}" if !path.directory?

      path
    end
def find_git_dir(path)
      path = Pathname.new(path).realpath
      while path.parent != path && !(path + ".git").directory?
        path = path.parent
      end
      
      path = path + ".git"
      
      raise "Could not find suitable .git dir in #{path}" if !path.directory?

      path
    end
Find the git dir