review() { branchName=`git rev-parse --abbrev-ref HEAD` branchAndTopic="${branchName}" if [ x"$1" != x"" ]; then branchAndTopic="${branchName}""/"$1 fi git push origin HEAD:refs/for/${branchAndTopic}%r=liheyuan@kanyun.com }
主要是自动选择了分支,防止push错
review() { branchName=`git rev-parse --abbrev-ref HEAD` branchAndTopic="${branchName}" if [ x"$1" != x"" ]; then branchAndTopic="${branchName}""/"$1 fi git push origin HEAD:refs/for/${branchAndTopic}%r=liheyuan@kanyun.com }
主要是自动选择了分支,防止push错
是个好主意。咨询个问题:脚本要放在哪里,进行调用哪