Let's say i have a code like this:
git fetch && git diff origin origin/master --quiet || echo "untracked"
And i want it to run periodically. Let's say, once a second, or once per five seconds and so on.
If this code outputs "untracked", or in other words, if there is an update on the remote,i will run a git pull
to update the local code.
Question is: Is it bad to do something like this? I mean, i know that it would be a constant request on the remote server. But, is it bad? And apart from that, is there any other side effects? Thank you very much.