git - Best practises for managing two repositories in one directory -
when create new project, git init
in project directory , download source of whatever framework i'm using (fuelphp, django, etc) , copy on project directory. way, don't have 2 sets of git information.
this sucks because isn't easy (i can't git clone
) , upgrading more of chore.
what best way manage this? should set new remote
within git after create project directory? like:
cd project_dir git init git remote add origin github_url git remote add fuelphp fuel_github_url git pull fuelphp master git add . git commit -m 'adding fuel' git push origin master
or considered bad practise?
if manage project in git , "framework" managed in git, too, have different possibilities:
- just copy files framework project. (this good, if don't want copy of whole history of framework, makes updates bit ugly.)
- use
git submodule
include other repository. (in project store pointer commit in framework repository.) - use
git subtree
pretty integrates commits of framework project , allows easy upgrades.
you have find out way best situation.
you can find nice article on topic here.
Comments
Post a Comment