How to update git to get remote branch information locally

A branch was created locally and push to the remote warehouse, but then the branch was deleted on the remote warehouse, and a new branch was created, and then the local branch remained. How to update the last created branch to the local instead of the local remaining branch?


do you mean to replace the local branch with the newly created branch of the remote repository? If so, just delete the local branch and pull down the remote one again.


create a new local branch corresponding to the remote branch, and then merge with the old branch to OK


you can pull down the remote branch git pull < remote library name > < remote branch name >: < local branch name > local remaining branch, you can ignore it. You can also delete it git branch-d < BranchName >


git pull


it is convenient to use visual management tools. There are cracking tutorials on sourceTree, so you can skip logging in
clipboard.png

.
Menu