Skip to content

Instantly share code, notes, and snippets.

@hraban
Last active April 18, 2024 06:46
Show Gist options
  • Star 64 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save hraban/10c7f72ba6ec55247f2d to your computer and use it in GitHub Desktop.
Save hraban/10c7f72ba6ec55247f2d to your computer and use it in GitHub Desktop.
Prevent accidentally committing debug code in Git
@hraban
Copy link
Author

hraban commented Aug 24, 2022

Ah now I understand what you meant, you had a specific problem getting it to actually work at all. Interesting, are you on Windows? What do you think the problem could be? Just for completeness' sake: the templatedir only applies to new repositories, not to existing ones. Might that have been the problem.

Either way, it's a gist, all comments welcome :P it's 3 lines of bash--not exactly ffmpeg 😂

@doronguttman
Copy link

😄 indeed on windows (wsl debian), but I guess my issue was the misunderstanding of what templatedir actually is. Indeed I was looking for it to work on an already cloned repo. I guess I had missed this comment 😊

well, maybe someone will find the core.hooksPath comment useful 🤷‍♂️

@netslow
Copy link

netslow commented Feb 11, 2024

why there is symbol d in regex ^[+d].*NOCOMMIT ? In which cases diff can return lines starting with d?

@hraban
Copy link
Author

hraban commented Feb 11, 2024 via email

@netslow
Copy link

netslow commented Feb 11, 2024

ok, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment