How can I update the old GitHub branch from the master?

Source: Internet
Author: User

The problem is that I have created a branch and have not made any changes. I have upgraded several master versions. Now it's stable. I want to modify it in the branch without affecting the main branch. How to update the old branch?

Baidu has many answers and there is no reliable method. According to my current understanding of GitHub, if the branch is directly merge to the primary branch, it is definitely not correct. Take the primary branch merge to the branch. It looks like this is acceptable, but it is too risky. In case the primary branch is changed, it will be a tragedy.

Solution:

Update the original master, create a new local branch, and then use the new branch to go to the Branch before merge. Then, the previous branch is changed to the latest version. Why should I keep the old branch because the branch name is good. Also, if some code in the previous branch cannot be deleted, this method is nice!

This article is from the "lu Xiao fish" blog, please be sure to keep this source http://2199572.blog.51cto.com/2189572/1560814

How can I update the old GitHub branch from the master?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.