Skip to content

Instantly share code, notes, and snippets.

@techiev2
Created April 24, 2020 07:33
Show Gist options
  • Save techiev2/4ad0c2411c43a6b8a88b9a44e61d1848 to your computer and use it in GitHub Desktop.
Save techiev2/4ad0c2411c43a6b8a88b9a44e61d1848 to your computer and use it in GitHub Desktop.
Update the codebase against development[/other branch] using a rebase
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