It may be duplicate because there is some similar question but I am not able to fix it, that's why I ask again with my code.
My sh
have these code:
cd /home/domain.com/data/domain-statistics
git fetch origin
git merge origin/master
git add --all
git add .
git commit -am "File generated and updated on `date`"
git push origin master
when i run it as:
-bash-4.2$ sh /home/domain.com/data/crons/push.sh
Then its always show as:
-bash-4.2$ sh /home/domain.com/data/crons/push.sh
/home/domain.com/data/crons/push.sh: line 1: cd: /home/domain.com/data: No such file or directory
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
please help me.