Closed alirezanet closed 2 years ago
0.4.0
Should prevent git exception In a clean new repo, when there are no commits.
git init
dotnet husky install
dotnet husky add pre-commit -c "dotnet husky run"
{ "tasks": [ { "command": "dotnet", "group": "pre-commit", "args": [ "dotnet-format", "--include", "${staged}" ], "include": [ "**/*.cs", "**/*.vb" ] } ] }
Adding an empty commit before Step 3 can solve the problem. git commit --allow-empty -m "first commit"
git commit --allow-empty -m "first commit"
Fixed via PR #34, in v0.4.1
v0.4.1
Version
0.4.0
Details
Should prevent git exception In a clean new repo, when there are no commits.
Steps to reproduce
git init
dotnet husky install
dotnet husky add pre-commit -c "dotnet husky run"
Temporary workaround
Adding an empty commit before Step 3 can solve the problem.
git commit --allow-empty -m "first commit"