如果我在git中有以下分支
1194-qa-server
master
remotes/origin/1178-authentication
remotes/origin/1194-qa-server
remotes/origin/HEAD -> origin/master
remotes/origin/master
Run Code Online (Sandbox Code Playgroud)
我想使用--just--切换到分支,即使需要调用脚本,例如:
switch_branch 1178
Run Code Online (Sandbox Code Playgroud)
并且脚本/解决方案应该执行以下操作
在不必手动执行所有这些步骤的情况下,建议的方法是什么?
我正在使用Mac OSX,如果这在这里很重要.
更新 - bash-it(github.com/revans/bash-it)符合我的目的
Welcome to Bash It!
Here is a list of commands you can use to get help screens for specific pieces of Bash it:
rails-help list out all aliases you can use with rails.
git-help list out all aliases you can use with git.
todo-help list out all aliases you can use with todo.txt-cli
brew-help list …Run Code Online (Sandbox Code Playgroud) ruby:什么是最优化的表达式来评估与结果相同的结果
phrase.split(delimiter).collect {|p| p.lstrip.rstrip }
Run Code Online (Sandbox Code Playgroud)