git - Command Line custom function -
I was playing around my terminal and I wrote the following basic function in my .zshrc file:
< Pre> function gspecial () {git merge $ 1; Rspec; }
With the above, when working with different branches, I can go to my master branch and call GSP with a specific branch, Will be merged with the given branch and immediately run the test.
Calling:
git (master) $ gspecial development
It does this sequence:
git (master) $ git merge development git (master) $ rspec
My question is, how can I Periphery The following scenario for expanding the universe:
git (development) $ git checkout master git (master) $ git merge development git $ rspec
< P> Many thanks!
Listen to surveillance @ devnal or he can swallow you ... but not seriously , That's right:
function gspecial () {git checkout $ 1; GIT $ 2 merge; Rspec; }
then:
$ gspecial master development
will do this:
< Code> $ git checkout master $ git merge development $ rspec
Tip:
Use more descriptive names like git-rspecial function
for names.
Comments
Post a Comment