Installation Steps:

Open Terminal using Spotlight search by pressing  <command+space>.
Type terminal and hit  
Enter key.

  • Now, run
    ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” < /dev/null 2> /dev/null
  • Install cgit using brew
    brew install cgit

cgit is ready to use now!