Hi, In the command: git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
<upstream> is 'rev-parsed' but <branchname> is not. *$ git checkout foo; git checkout bar* *Switched to branch 'foo'* *Switched to branch 'bar'* *$ git branch -u @ foo #A* *Branch foo set up to track local branch bar.* *$ git branch -u @{-1} bar #B* *Branch bar set up to track local branch foo.* *$ git branch -u @ foo #C* *Branch foo set up to track local branch bar.* *$ git branch -u @ @{-1} #D* *fatal: branch '@{-1}' does not exist* *$ git branch -u @{-1} @ #E* *fatal: branch '@' does not exist* I think git should expand the <branchname> for the cases #D and #E. It it makes sense, could you please open an issue? git version 2.0.1 in Ubuntu. -- Daniel Fanjul Alcutén https://github.com/daniel-fanjul-alcuten -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.