![]() |
GIT branching/cloning new repo question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: GIT branching/cloning new repo question (/showthread.php?tid=55908) |
GIT branching/cloning new repo question - El Forum - 11-16-2012 [eluser]rogierb[/eluser] 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. GIT branching/cloning new repo question - El Forum - 11-16-2012 [eluser]PhilTem[/eluser] 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 ![]() 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 ![]() GIT branching/cloning new repo question - El Forum - 11-16-2012 [eluser]skunkbad[/eluser] 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. |