Git(hub): change branch?
I’ve forked a repo on github and then made a few changes on master branch.
But I made a mistake, I had to work on a new branch not on the master one.
Can I change branch or should I fork the master again, then make the branch and apply the changes I made?
One Solution collect form web for “Git(hub): change branch?”
Rename your local branch:
git branch -m master newbranch
Push it to your remote (let’s say
git push myremote newbranch
Create a master branch from github’s original remote (say
git branch master origin/master
Forcefully push it:
git push myremote +master:master
This should do it.