设置保存登录凭证
有两种方式,分别是https和ssh
https免密
vim .git/config
在config文件最后加上
[credential]
helper = store
以后输入一次账号密码后就会记住
ssh
不细说了应该都会
一键提交
新建commit文件
vim commit
内容如下:
#!/bin/bash
currDir=$(pwd)
remark=$1
if [ ${remark}x = ""x ];then
remark=$(date +"%Y-%m-%d %H:%M:%S")
fi
echo ${currDir}
git add .
git commit -m "\"${remark}\""
git push
使用方法:
./commit '提交备注'