Reputation: 6132
I have a project written in Laravel 4. Everything goes to "master" branch in Bitbucket. I'm migrating my app to Laravel 5 and I'd like to keep both versions in my git repo as separate branches.
My local folder structure looks like this:
Project - this is my main git repo folder
˪name - Laravel 4 code is here, all in git already, on "master" branch
˪name5 - Laravel 5 code is here, not in git yet. Should go to a separate branch
How do I go about achieving that?
Upvotes: 0
Views: 570
Reputation: 1683
What you want to do is to commit all the current changes on name
to your master branch. Then create an empty branch in the same folder, let's say develop
, and move name5
to name
.
Finally, commit/push your changes to this new branch.
git checkout --orphan develop
name5
to name
(without removing name/.git/ folder)Upvotes: 1