문제

I am new to Github and recently forked somebody's project to make my own changes. Now though I learn it's best practice to create each new feature or bug fix in a new branch. Up until now I was just editing in the Master.

How can I can create a new branch out of my Master, then replace my edited master with the upstream code repository once again?

도움이 되었습니까?

해결책

Assuming the upstream repo is origin...

git branch some_feature
git reset origin/master

Now your branch is where the remote master branch is, and your code is on the branch some_feature.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top