Git

push.sh

#!/bin/bash
# 一次性处理git提交
#branch_name=`git symbolic-ref --short -q HEAD`
branch_name=$(git symbolic-ref --short -q HEAD)
if [ ! -n "$1" ] ;then
commit=`date +%Y-%m-%d`
else
commit=$1
fi
git add .
git commit -m "$commit"
git push origin "$branch_name"

pull.sh

#!/bin/bash
# 一次性处理git拉取
#branch_name=`git symbolic-ref --short -q HEAD`
branch_name=$(git symbolic-ref --short -q HEAD)
git pull origin "$branch_name"

配置全局命令

vim .zshrc

alias push="sh /home/ikun/sh/push.sh"
alias pull="sh /home/ikun/sh/pull.sh"