Last active
September 9, 2020 03:53
-
-
Save kyktommy/d2a32a977a22dd9a253c167d9373e487 to your computer and use it in GitHub Desktop.
git helper
This file contains hidden or 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
# pull latest with stash | |
function gitup() { | |
git stash -u | |
git pull --rebase | |
git stash pop | |
} | |
# stash staged | |
function gitstash() { | |
git stash push -m $1 -- $(git diff --staged --name-only) | |
} | |
# pull all remote branch | |
function gitall() { | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment