Starting git v1.8.0+, the --set-upstream-to option was added to the git branch command to replace the older (and now deprecated) option, --set-upstream. Both commands set the upstream for a local branch.

--set-upstream was deprecated in favor of --set-upstream-to for the git branch command to avoid confusion with the --set-upstream option available with the git push command (which is slightly different).

Published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing.