M
M
med1um2020-09-08 10:38:15
git
med1um, 2020-09-08 10:38:15

How to use Git's auto-formatting pre-commit indent hook?

In the editor, I use 5 spaces as a tab, but I need to indent with 2 spaces to commit.

I googled that you need to use the pre-commit hook for this, but what exactly needs to be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alternativshik, 2020-09-08
@alternativshik

write a script that will do this and hang it as a pre-commit hook

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question