What's the Difference Between --set-upstream and --set-upstream-to in Git?

--set-upstream vs. --set-upstream-to

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).

Hope you found this post useful. It was published . Please show your love and support by sharing this post.