Y
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
otikik
597 days ago
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)'
link
git config --global alias.track '!git branch -u origin/$(git branch --show-current)'