Skip to content

Instantly share code, notes, and snippets.

@godcheese
Last active June 29, 2017 09:27
Embed
What would you like to do?
Linux platform bash file be used to git push code
#!/usr/bin/env bash
# Linux platform bash file
echo "正在添加文件..."
git add .
echo -n "正在提交备注...,请填写备注(可空):"
read remarks
if [ ! -n "$remarks" ];then
remarks="常规提交"
fi
git commit -m "$remarks"
echo "正在开始提交代码..."
git push origin master
echo "代码提交成功,正在关闭..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment