I am trying to get validation on how to go about setting up a git repo from our existing 3 folder structure (dev,beta,prod). I understand the technical/what commands to type part. But how do I go about creating the 3 branches from the 3 folders. Unfortunately these aren't new project we can start fresh with git on, there are lots of files already in play. And the dev folder varies a good bit from the beta/prod folders.
Our idea
- Create the repo in the prod folder, making it the 'master' branch.
- Then create a branch 'release', this would match master for now (we have no beta testing happening now, so disregarding/deleting the beta folder).
- Next create a 'dev' branch.
- Delete the files from the folder/dev branch?...
- Copy files from the dev folder in?...
- Track, stage, commit...?
Steps 4-6 are the concerning part, I don't know if deleting all the files then copying in from the dev folder would be missing anything
In theory this would give us the three branches we could pull/clone from to our local machines. Merging into release and prod from dev would have to be interactive/cherry-picked for a bit, which I think we can manage.
Any advice is greatly appreciated, even if it's a yelling and screaming of 'no wait, not that way!'