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

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

Options
  • 10-03-2020 3:01pm
    #1
    Registered Users Posts: 5,576 ✭✭✭


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


Comments

  • Registered Users Posts: 27,163 ✭✭✭✭GreeBo


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


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


    git branch -r


  • Registered Users Posts: 2,024 ✭✭✭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 Posts: 2,809 ✭✭✭antimatterx


    Just switch branch?


  • Registered Users Posts: 6,259 ✭✭✭Buford T Justice


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


  • Advertisement
Advertisement