Skip to content

Instantly share code, notes, and snippets.

@zainengineer
Last active November 3, 2022 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zainengineer/46e4866f3617ce8e94259495fd69cfb0 to your computer and use it in GitHub Desktop.
Save zainengineer/46e4866f3617ce8e94259495fd69cfb0 to your computer and use it in GitHub Desktop.
git branch set upstream
#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