1 Star 0 Fork 0

xxxcxy/sky-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
git.sh 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
xxxcxy 提交于 2020-11-06 14:14 . add
#!/bin/sh
# git log
# git reset --hard commitId
# git push --force
push() {
old_un=`git config user.name`
old_ue=`git config user.email`
echo "current user name : ${old_un}"
echo "current user email: ${old_ue}"
echo "switch..."
new_un="xxxcxy"
new_ue="yy_z3em@163.com"
git config user.name $new_un
git config user.email $new_ue
echo "current user name : $(git config user.name)"
echo "current user email: $(git config user.email)"
echo "do git commit -a -m 'add'"
git commit -a -m 'add'
echo "do git push origin master"
git push origin master
echo "switch..."
git config user.name $old_un
git config user.email $old_ue
#echo "current user name : $(git config user.name)"
#echo "current user email: $(git config user.email)"
echo "current user name : `git config user.name`"
echo "current user email: `git config user.email`"
pause
}
function pause(){
read -n 1 -p "$*" INP
if [ $INP != '' ] ; then
echo -ne '\b \n'
fi
}
$1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xxxcxy/sky-web.git
git@gitee.com:xxxcxy/sky-web.git
xxxcxy
sky-web
sky-web
master

搜索帮助