【发布时间】:2014-03-17 06:53:02
【问题描述】:
我在我的终端上玩耍,我在我的 .zshrc 文件中编写了以下基本函数:
function gspecial () {
git merge $1; rspec;
}
当使用单独的分支时,我可以切换到我的主分支并使用给定分支调用 gspecial,然后将给定分支合并到主分支,然后立即运行测试。
调用:
git(master)$ gspecial development
它执行这个序列:
git(master)$ git merge development
git(master)$ rspec
我的问题是,我如何(如果可能)扩展此功能以适应以下情况:
git(development)$ git checkout master
git(master)$ git merge development
git(master)$ rspec
非常感谢!
【问题讨论】:
-
提示:在函数中使用更多参数..
标签: git unix terminal zsh branching-and-merging