Last active
November 3, 2022 08:00
-
-
Save zainengineer/46e4866f3617ce8e94259495fd69cfb0 to your computer and use it in GitHub Desktop.
git branch set upstream
This file contains hidden or 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
#did not help but tried any ways | |
git config --global branch.autosetupmerge always | |
git config --global pusg.default current | |
#pull one might not be a real thing but putting it as makes sense | |
git config --global pull.default current | |
git config --global pull.default simple | |
git push -u origin HEAD | |
git config pull.default tracking | |
#new tried but did not work | |
#git 2.37.0 required | |
git config --global --bool push.autoSetupRemote true | |
git config --global push.default current | |
https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushautoSetupRemote | |
#work but too long | |
git branch -u origin/branchName | |
~/.gitconfig | |
[alias] | |
ztrack = \ | |
!git branch \ | |
--set-upstream-to=origin/`git symbolic-ref --short HEAD` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment