Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am getting the below commit error in my Mac OS after updating to the latest version. Tried restarting VS Code and also tried to use terminal and same error. Until
git add .
step it works fine. Only the commit command is not working fine. What could be the issue?
git commit -m "Commit message"
.git/hooks/pre-commit: line 15: python: command not found
.git/hooks/pre-commit: line 16: python: command not found
–
The following code in the .git/hooks/pre-commit
file throws python: command not found
# Linux / Mac
python ${HOOKS_DIR}/detect_remote
python ${HOOKS_DIR}/detect_secret
The solution for me is as easy as update python
to python3
in the pre-commit file since I have python3
installed on my Mac.
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.