I am writing a series of scripts for Git management in zsh.

How do I check if the current directory is a Git repository? (When I’m not in a Git repo, I don’t want to execute a bunch of commands and get a bunch of fatal: Not a git repository responses).

14 Answers
14

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *