1 Star 0 Fork 0

卮客/misakaGG

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
repos.sh 2.77 KB
一键复制 编辑 原始数据 按行查看 历史
面码酱 提交于 2017-01-10 17:15 . 追加辅助工具
#!/bin/sh
# @brief tiny tool used to manger project
# @file repos.sh
# @author xiyanxiyan10
# @CreatedTime 2014/09/27
# @LastChanged 2014/09/27
case "$1" in
"record" )
git commit -a
;;
"pull" )
git pull origin master
;;
"push" )
git push
;;
"changelog" )
git log --oneline
;;
"checkout" )
git checkout -- .
;;
"revert" )
git revert ${2}
;;
"add_remote" )
git remote add ${2} git@github.com:${2}/${3}.git
;;
"pull_remote" )
git remote add ${2} git@github.com:${2}/${3}.git || git fetch ${2} && git merge ${2}/master
;;
"fetch" )
git fetch ${2}
;;
"merge" )
git merge ${2}/master
;;
"show_remote" )
git remote -v
;;
"tag" )
git tag -a ${2}
;;
"pushtag" )
git push git@github.com:${2}/${3}.git --tag
;;
"clean" )
find -name '*.out' |xargs rm
find -name 'cscope.*' |xargs rm
find -name 'tags' |xargs rm
find -name '*.so' |xargs rm
find -name '*.o' |xargs rm
find -name '*.a' |xargs rm
find -name '*.d' |xargs rm
find -name '*.pyc' |xargs rm
;;
"review")
cscope -bqR
ctags -R *
;;
"replace")
${2} | xargs perl -pi -e \'${3}\'
;;
* )
echo "Help"
echo "./repos.sh record => record patch"
echo "./repos.sh pull => pull patch"
echo "./repos.sh push => push patch"
echo "./repos.sh changelog => show changelog"
echo "./repos.sh checkout => revert change code"
echo "./repos.sh revert => revert patch by id"
echo "./repos.sh add_remote => add new remote"
echo "./repos.sh fetch => fetch from remote"
echo "./repos.sh merge => merge from remote"
echo "./repos.sh pull_remote => pull from remote"
echo "./repos.sh show_remote => show remote"
echo "./repos.sh tag => tag version"
echo "./repos.sh pushtag => push tag"
echo "./repos.sh clean => clean project"
echo "./repos.sh review => review project"
echo "./repos.sh [cmd] [replace pattern] => change some pattern matched in matched file"
;;
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zhiiker/misakaGG.git
git@gitee.com:zhiiker/misakaGG.git
zhiiker
misakaGG
misakaGG
master

搜索帮助