Wednesday, 15 April 2015

git how to mark a specific subfolder as branch -



git how to mark a specific subfolder as branch -

recently migrated svn git using git-svn.

actual size of checkeded out code ~24gb. in git, see 1 time branch origin/master. hence if each developer clone master, need pull 24gb everytime, real pain.

so, need mark of existing locations branches, can checked out directly, instead of total repo.

project repo construction like:

/docs/ /project-maintainance/ /main-project/ /module1 /branch1 /branch2 /module2 /branch1 /branch2 /branch3

now, accomplish task, want mark specific folders branch, instead of creating new branches. browsed through many webpages, increased confusion i'm beginner.

how can branches created subfolder instead of top level folder?

edit: right aim able checkout multiple subtrees, force , pull changes.

unfortunately, git not work distributed version command scheme (dvcs). means have entire re-create of code , not part of it.

however, possible called shallow clone. example:

git clone <repo> --depth 1

this approach comes various caveats - can find plenty more give-and-take here.

ultimately, 24gb extremely big git repo. in fact i've never heard of such big repository before. may worth investigating trying drastically cut down in size using filter branch command.

i have written ruby gem - still in development - provides basic stats git repository such big files in history (and no longer in working copy) may suitable candidates removal using filter branch.

another alternative split single repository multiple ones. can't recommend don't know how code fits together, there a great give-and-take here.

git git-branch subfolder

No comments:

Post a Comment