Created
April 24, 2020 07:33
-
-
Save techiev2/4ad0c2411c43a6b8a88b9a44e61d1848 to your computer and use it in GitHub Desktop.
Update the codebase against development[/other branch] using a rebase
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 updateFromDev='git stash && git pull origin development --rebase && git stash pop' | |
function cd() { | |
builtin cd "$@" || return | |
if [[ -d .git ]] | |
then | |
updateFromDev | |
fi | |
} | |
# Adopted from https://unix.stackexchange.com/a/366923 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment