Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com

Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com
I noticed that I often do the same sequence of git commands.
run 
notepad ~/.gitconfig
and add
[alias]
spa = !git stash && git pull && git stash apply
Then execute
git spa

I've created .bashrc with command
notepad ~/.bashrc
and added the following

StashPullApply() {
git stash
git pull
git stash apply
}

Now I can use just the name in git bash 
StashPullApply

Posted on Wednesday, February 17, 2016 9:27 PM Visual Studio/TFS/git | Back to top


Comments on this post: Stash, Pull, Stash Apply as one git command

# re: Stash, Pull, Stash Apply as one git command
Requesting Gravatar...
.gitconfig
[alias]
spa = !git stash && git pull && git stash apply

?
Left by dox on Feb 18, 2016 10:57 AM

# re: Stash, Pull, Stash Apply as one git command
Requesting Gravatar...
This sounds a lot like the rebase.autoStash option...although that one only works for pull --rebase, which is my preference anyway.
Left by Daniel Laughland on Mar 01, 2016 11:23 AM

Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net