git - Copying some branches of a repository into a new repository -


we have huge git repository (say )that contains many branches. want create new smaller repository (say b) contain few branches of a.

what know follows

  1. clone branches repository local
  2. push these branches repository b.

don't have method copy these branches directly repository b?. or improvement above mthod?

if have direct access repo a, can directly branch want new repo b.

but if need clone first, concrete example exists in "clone stable , 1 other branch in git?", , uses same tip question mentioned mnagel, git remote:

 cd b  git init .  git remote add -f -t remote-branch1 -t remote-branch1 remote-name remote-url 

note -f which, when used git remote add, fetch remote_name.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -