Skip to content

Instantly share code, notes, and snippets.

@godcheese
Last active June 29, 2017 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godcheese/2c4ab58fc03674fd0ce523701cd88075 to your computer and use it in GitHub Desktop.
Save godcheese/2c4ab58fc03674fd0ce523701cd88075 to your computer and use it in GitHub Desktop.
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