Comment

Comment by aneth4

> "git branch --set-upstream" is deprecated and may be removed in a relatively distant future. "git branch [-u|--set-upstream-to]" has been introduced with a saner order of arguments.

It would be great if changes to the git CLI were thoroughly thought through instead of one-off fixes like this. This is the reason the interface is such a mess.

  git branch foo --track origin/foo
But if you forgot --track:

  git branch foo
then it's:

  git branch foo --set-upstream-to origin/foo
and don't you dare do

  git branch --set-upstream-to origin/foo

Upstream and track are the same - why two different words?

And now we have --set-upstream-to and --set-upstream, which will be fun for git newbies to distinguish.

parent aneth4 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton