I have the following pre-push hook:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn generatestrings
generatestrings
generates 2 .json
files under project/src/assets/locales/
pre-push but the generated files are not added and committed, which in turn doesn't push them. This is why I added this next:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn generatestrings
git add .
git commit -m "Generated translations"
Which works fine but I don't want to add everything, just the JSON files located in the locales folder. This is why I tried this:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn generatestrings
git add ./src/assets/locales/
git commit -m "Generated translations"
But this gives me an error:
Your branch is ahead of 'origin/test' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Anyone has any idea what am I doing wrong?