Just small note... I tried to make some shell script which works with GIT commands. So, I need to set shell output to some variable.
I cannot do that with such approach. It always show me result.
The answer I found by link.
So we need to add a little change:
Works!
var=$(git pull)
I cannot do that with such approach. It always show me result.
The answer I found by link.
So we need to add a little change:
var=$(git pull 2>&1)
# or
var=$(git pull > /dev/null 2>&1)
Works!