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
This commit is contained in:
1 parent
5153b15245
commit
29ef3f0033
1 file changed
+9
@@ -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
|
||||
```
|
||||
Reference in new issue
Block a user