Skip to content

Commit 1a18cfe

Browse files
committed
hotfix: use reset instead of checkout
1 parent 115d2e7 commit 1a18cfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.husky/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
DIR=$(cd `dirname $0` && pwd -P)
55

6-
# adds these changes to be part of the current commit
7-
git checkout $DIR/../public/node-releases-data.json
8-
git checkout $DIR/../public/blog-posts-data.json
6+
# if the generated files got tracked to this commit we revert them
7+
git reset $DIR/../public/node-releases-data.json
8+
git reset $DIR/../public/blog-posts-data.json
99

1010
# lint and format staged files
1111
npx lint-staged

0 commit comments

Comments
 (0)