Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

faild to executor git hook for clang-format

I had add an git hook when commit code it will do code format check . the executor command  run in sourcetree always got an error  like this :

bash /myresponsedir/git_hook/hooks/commit-msg-hook/

======start git format========

[0;31m please install clang-format, mac: brew install clang-format [0m


the git hook can works fine in terminal. but failed in sourcetree.  

In previous version i remember it works fine in sourcetree, but when I update to 4.2.2(250), it always failed.


2 answers

can anybody help me with this git hook problem? 

0 votes
Oday Rafeh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 28, 2023

Hi @杨闯 

It's possible that the environment variables or paths set up in your terminal are not the same as those set up in Sourcetree.

You can try adding the path to clang-format to your Sourcetree environment variables.

To do this, go to Sourcetree > Preferences > Advanced, and under "Environment Variables", add a new variable with the path to clang-format.

For example, if you installed clang-format using Homebrew, the path might be /usr/local/opt/llvm/bin/clang-format.

After adding the variable, try running the hook again in Sourcetree to see if it works.

there's no environment config in Advanced setting page.  it's on mac platformscreenshot-20230328-163300.png

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events