Enhancing pre-commit bash script documentation. (#3638)

* Enhancing pre-commit bash script documentation.

* Correcting typo.

* attempt to correct lint problem

* Grammar clarification.

* Further styling correction

Mark .git/hooks/post-commit as ```code```

* Remove redundant exit 0 from post-install script.

* Insert newline
master
Milen Igrachev 2018-02-24 10:12:25 +02:00 committed by Lucas Azzola
parent 5153b15245
commit 29ef3f0033
1 changed files with 9 additions and 0 deletions

View File

@ -110,3 +110,12 @@ echo "$jsfiles" | xargs git add
exit 0
```
If git is reporting that your prettified files are still modified after committing, you may need to add a post-commit script to update git's index as described in [this issue](https://github.com/prettier/prettier/issues/2978#issuecomment-334408427).
Add something like the following to `.git/hooks/post-commit`:
```bash
#!/bin/sh
git update-index -g
```