This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir stashes | |
refs=$(git stash list|cut -d: -f1) | |
for ref in $refs; do git stash show "$ref" -p > ./stashes/$ref.patch; done | |
#refs=$(git rev-parse $refs|tac) | |
#oldpath=$PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
# Sync a branch with it's upstream without needed to checkout | |
sync = !sh -c 'git fetch upstream && git push . "upstream/$0:$0"' | |
syncma = sync master | |
#Autostash before a git command `git s rebase ....` | |
s = !sh -c \"git stash save | grep 'No local changes to save' && git $* || (git $* && git stash pop) \" | |
autostash = !sh -c \"git s $*\" |
OlderNewer