5 ms·
This needs a “git-track”. Make the current branch track the one in origin with the same name, if it exists
by otikik 2y ago
This needs a “git-track”. Make the current branch track the one in origin with the same name, if it exists
- gchamonlive 2y agoIn 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.
- otikik 2y agoThanks. 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)'
- gtirloni 2y ago[push] autoSetupRemote = true