When you install HomeBrew, the console might show you fllowing code
fatal: cannot copy '/Library/Developer/CommandLineTools/usr/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/usr/local/Homebrew/.git/hooks/fsmonitor-watchman.sample': Permission denied
Failed during: git init -q
You are not permit to copy that directory, so you have to give this directory permision
Run fllowing code as change it