GIT branching/cloning new repo question

I've been using SVN for many many years and know it inside and out. But for the last 2 years I've been using GIT on a large project. Its a rewrite/redesign project. Right now I'm facing a a split off between the old code and language and the new code and language (CI/PHP5). Part of the app will get moved to different servers. I want to seperate the old from the new. I dont need any f the old code on the new servers.

In SVN I would just create a new repo. Then create a shell script to checkout/update/set rights etc.

GIT seems to prefer branches, I think... Well that is my question. What do I do? Do I branch, clone, create a new repo? But mainly why?

Thanks for your answer.

I'd say: Create a new repo.
Why? Because, as you said, you don't need any of the old code on the new servers. Creating a new repo will start you off of a clean repo without any code.
However, you can add a submodule that links to the other repo (as long as it's .git, too Wink ) which can be updated as easy as a usual repo without actually "injecting" code into your repo's code that you have to worry about.

On the other hand you could create a clone of the repo and branch off - since cloning and creating a new repo with a submodule isn't very different.

Plus, if you have a new repo and want to look at code from the old repo you can do it easier than if you did in the same repo Wink

If there was any chance that the old code would make it to the new server, then I'd say branch, but I think you should just create a new repo. You can refer back to the old one if needed.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.