Advertisement
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.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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,762 ✭✭✭


    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,517 ✭✭✭✭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,720 ✭✭✭antimatterx




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


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


  • Advertisement
Advertisement