[英]How 1. git stash 2. git pull origin master 3. git stash apply, on a single command?
How I can do this in one command on MacOSX? 如何在MacOSX上的一个命令中执行此操作?
git stash
git pull origin master
git stash pop
I've tried with git stash && git pull origin mater && git stash apply
and works fine. 我已经尝试过git stash && git pull origin mater && git stash apply
并且效果很好。
Use git aliases . 使用git别名 。 Eg 例如
[alias]
spullsa = "!git stash && git pull origin mater && git stash apply"
If you want something more "official" than setting up a git alias, you might be interested in http://www.git-legit.org/ . 如果您想要的不是设置git别名更“正式”的东西,您可能会对http://www.git-legit.org/感兴趣。 What you're doing is similar to "git sync". 您正在执行的操作类似于“ git sync”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.