git批处理脚本

方法1
先在 git bash 里执行:
alias blog='git add .; git commit -m "blog update"'; git push origin gh-pages
以后要更新博客时,直接执行 blog

 

方法2
在 git bash 里执行
git config --global alias.blog '!git add . && git commit -m "blog update" && git push origin gh-pages'
或者
编辑 .git/config 文件,加上这么一段:

[alias]
blog = !git add . && git commit -m 'blog update' && git push origin gh-pages
以后要更新博客时,执行 git blog

猜你喜欢

转载自www.cnblogs.com/yezhaohui/p/9419480.html