There is a newly created empty repository on GitHub.
Originally, we were supposed to clone the repository, commit it to the master branch, branch it to the topic branch, work on it, and eventually send PR to the master.
However, I realized that I was doing all the work on the master now.
What I want to do is to transfer all commits on the master branch to another branch, and then the branch to which I want to transfer to branches off from the master.
Is it possible?
Also, please let me know if there is any other way to send PR to the master from this situation.
Let's rename it.
git branch-m master develop #Rename local master to develop
git push origin:master#remote master branch removed
git push --set-upstream origin develop #push to remote as develop
Or why don't we just make brunch?
git branch develop master
git checkout develop
git push origin develop
© 2025 OneMinuteCode. All rights reserved.