I'm working with a repository that in theory should be following the Gitflow Workflow (see A successful git branching model by Vincent Driessen). However, the initial commit on the repository was made on the develop
branch and there is no master
branch to be seen. It's nearing release time and I need to create a master
branch that reflects the production-ready state of the project which should've been there from the start. Keep in mind that the develop
branch has multiple feature branches coming off of it. The repository is entirely local and hasn't been pushed.
My idea was to create an orphan branch master
and rebase the develop
branch onto it, but I don't know how I'd go about doing that.
So, how can I create the master
branch as if it was created from the start?
Update: In my case, the first commit on develop
is not a commit that should be considered suitable for production, so using this as the initial master
commit would be unwise. The reason that the project is in this state is because it was originally not using a VCS when it was decided to use Git.