Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.

Git: How to pull from a remote branch where the name of branch has changed

  • 10-03-2020 03:01PM
    #1
    Registered Users, Registered Users 2 Posts: 5,750 ✭✭✭


    New scenario for me. How do i get it to "know" to get the new branch name


Comments

  • Registered Users, Registered Users 2 Posts: 27,483 ✭✭✭✭GreeBo


    Has the branch changed or the project?
    If its just then branch then you would just checkout the new branch name?


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    git branch -r


  • Registered Users, Registered Users 2 Posts: 2,062 ✭✭✭Colonel Panic


    That just lists the remote branch.

    If you're talking about tracking a new remote branch to an existing one with the "old" name, you can track a new remote branch using

    git branch -u remote_name/branch_name

    Also, git branch help lists this stuff!


  • Registered Users, Registered Users 2, Paid Member Posts: 3,617 ✭✭✭antimatterx




  • Registered Users, Registered Users 2 Posts: 6,271 ✭✭✭Buford T Justice


    git branch --set-upstream <remote-branch>


  • Advertisement
Advertisement