Add logic to detect git