Skip to content

Commit

Permalink
Adding rough how-to instructions to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bbenesh authored May 4, 2017
1 parent cb0bc89 commit 66e257a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,24 @@ My global git hooks -- most notably, they play audio files when you pull, commit

//TODO:
1. documentation on how to install these globally...

I put these directly in my home directory and configure them as global so that they run in every project on my computer.
To make these work globally, run:
git config --global core.hooksPath path/to/wherever/you/cloned/this/directory

These will now run in any new git repo you create on your local computer. In order to get them to run on any projects that already exist on your local, cd into that project and run `git init` to re-initialize the project. This won't harm anything, it will just refresh your git so that it is aware of the new global config you just created.

2. with info on how to install them on just a local project.

You could also just take the /hooks and /sounds directories and place them in the .git directory of one specific project, and then they would run just for that project. Make sure you run `git init` in your local project after you add these new hooks.

Resources: a list of all the urls I hit up when piecing together how to accomplish this

http://stackoverflow.com/questions/17219540/how-can-i-play-a-sound-whenever-i-commit-to-git
https://collectiveidea.com/blog/archives/2010/08/03/happy-git-commits
#outdated http://stackoverflow.com/questions/2293498/git-commit-hooks-global-settings
http://stackoverflow.com/questions/1977610/change-default-git-hooks/37293001#37293001
https://github.com/git/git/blob/6675f501f6b987dbdb0dbeb1d2efeb5a27fc41a7/Documentation/githooks.txt
https://www.atlassian.com/git/tutorials/git-hooks
http://stackoverflow.com/questions/5084100/post-commit-hook-not-running
https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks

0 comments on commit 66e257a

Please sign in to comment.