Hacker News new | ask | show | jobs
by gchamonlive 600 days ago
In oh-my-zsh you have `ggsup` which is an alias for `git branch --set-upstream-to=origin/$(git_current_branch)`. `git_current_branch` is also a function that is bundled with oh my zsh.
1 comments

Thanks. I found a way to do it with just git. No oh-my-zsh necessary:

git config --global alias.track '!git branch -u origin/$(git branch --show-current)'