parent
b20d05fb36
commit
f516f6f9d5
10
git-hooks.md
10
git-hooks.md
@ -1,4 +1,12 @@
|
|||||||
Put the following in `.git/modules/public/hooks/pre-commit`:
|
Put the following in `.git/hooks/pre-commit`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for file in $(git status --porcelain --untracked=all | cut -b 4- | grep "\.png$") ; do pngcrush -brute -ow $file; done
|
||||||
|
```
|
||||||
|
|
||||||
|
And in `.git/modules/public/hooks/pre-commit`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
Loading…
Reference in New Issue
Block a user