#5700 Replace "git branch --set-upstream" with "git branch --set-upstream-to" [ss2584]

v1.2.0
closed
General
2015-08-20
2013-01-28
Chris Tsai
No

[forge:site-support:#2584]

The example command currently is "git branch --set-upstream master origin/master", however the --set-upstream option is deprecated:

$git branch --set-upstream master origin/master
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
Branch master set up to track remote branch master from origin.
$

Referring to the "empty git repo" instructions.

Related

Tickets: #7390

Discussion

  • Dave Brondsema

    Dave Brondsema - 2014-05-14
    • labels: support, p3 --> support, p3, bitesize
     
  • Cory Johns

    Cory Johns - 2014-06-29
    • status: open --> in-progress
    • assigned_to: Cory Johns
    • Size: --> 1
    • Milestone: limbo --> forge-jul-11
     
  • Cory Johns

    Cory Johns - 2014-06-29
    • status: in-progress --> closed
     
  • Cory Johns

    Cory Johns - 2014-06-29

    Merged to master.

     
  • Dave Brondsema

    Dave Brondsema - 2014-08-12
    • status: closed --> open
    • Milestone: forge-jul-11 --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2014-08-12

    Looks like we actually need to drop the local branch name for the new version of this command. E.g. git branch --set-upstream-to origin/master otherwise you get an error.

     
  • Dave Brondsema

    Dave Brondsema - 2014-09-22
    • Milestone: forge-backlog --> forge-oct-3
     
  • Dave Brondsema

    Dave Brondsema - 2014-09-22
    • assigned_to: Cory Johns --> nobody
     
  • Alexander Luberg

    • status: open --> in-progress
    • assigned_to: Alexander Luberg
     
    • Prefabbricati

      Prefabbricati - 2017-11-29
       

      Last edit: Prefabbricati 2017-11-29
  • Alexander Luberg

    I propose to update it as :

    git push -u origin master
    

    instead of:

    git push origin master
    git branch --set-upstream-to master origin/master  # so 'git pull' will work later
    

    Refer to: http://git.661346.n2.nabble.com/ANNOUNCE-Git-v1-8-0-rc1-tc7568792.html

     * It was tempting to say "git branch --set-upstream origin/master", 
       but that tells Git to arrange the local branch "origin/master" to 
       integrate with the currently checked out branch, which is highly 
       unlikely what the user meant.  The option is deprecated; use the 
       new "--set-upstream-to" (with a short-and-sweet "-u") option 
       instead. 
    
     
  • Dave Brondsema

    Dave Brondsema - 2014-09-25

    +1 makes sense to me

     
  • Alexander Luberg

    • status: in-progress --> code-review
     
  • Alexander Luberg

    allura-fork:al/5700

     
  • Dave Brondsema

    Dave Brondsema - 2014-10-01
    • status: code-review --> closed
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-01-05
    • Milestone: unreleased --> asf_release_1.2.0
     

Log in to post a comment.