简体   繁体   中英

Setting up Git repo with other Git repo with Submodule? (WordPress development)

I have a Git project/repo called "ABC" to which I would like to add WordPress among other things.

ABC
  WordPress
  Other 
  Stuff

Ideally I would like to base my WordPress setup on the WordPress Skeleton repo. (The WordPress Skeleton also contains a submodule referring to the latest stable WordPress release.)

How do I go about creating this setup?

  1. Should I fork the WordPress-skeleton vs copy it into my existing repo?
  2. How do I update the submodule that the WP-skeleton refers to from my ABC git repo?

I guess I am confused regarding the use of forks in this scenario when I want the ABC to contain code from other repos that in themselves have submodules.

Basically what you are looking for is a tool to manage multiple repos. Here are few:

repo (http://source.android.com/source/version-control.html)
gitslave (http://gitslave.sourceforge.net/)

Also beware of submodule gotchas':

http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/

@dani I did something like that. I created this git project: http://stechico.github.io/wordpress-skeleton/

Code samples there if any. HTH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM