如何解决 fatal: cannot exec ‘git-br’: Permission denied

不知道谁动了环境变量导致git alias无效

#找到git执行程序所在的目录
$ which git
/usr/bin/git

#查看一下当前的环境变量,的确没有/user/bin
$ echo $PATH
/home/magic/.composer/vendor/bin/:/usr/local/webserver/php/bin:/usr/local/node/bin:/usr/local/webserver/mysql/bin:/usr/local/mongodb/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/ffmpeg:/usr/local/go/bin:/gocode/bin:/home/magic/bin

#添加/user/bin进环境变量
$ PATH="$PATH:/usr/bin"
$ echo $PATH
/home/magic/.composer/vendor/bin/:/usr/local/webserver/php/bin:/usr/local/node/bin:/usr/local/webserver/mysql/bin:/usr/local/mongodb/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/ffmpeg:/usr/local/go/bin:/gocode/bin:/home/magic/bin:/usr/bin

成功解决 fatal: cannot exec ‘git-br’: Permission denied