I was wondering if somebody could explain to me how to GIT merge master into a new branch and then clear out master as to have master clean working directory.
In other words: master -> PHP since master will now have Python.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One solution would be, if nobody has cloned your repo yet, to:
PHPbranch where master currently isPythontipSee:
From the
checkoutman page:But if others have cloned your repo, you need to reset the content of master, keeping all the previous commits.
That would be a good case for the non-existent
merge -s theirs(where your discard your current content and replace it with the one of another branch, likePythonin tour case):See “git command for making one branch like another” for more.
(and start first by making the
PHPbranch wheremastercurrently is, like above: that bit doesn’t change and will mark wherePHPupdates need to go from now on)