سؤال

So I'm working with Wordpress Skelton and it has a submodule for Wordpress where you can checkout the latest version based on tags.

I was new and didn't understand this linked directly to the Wordpress repo and I could update myself once setup based on their master repo pushing changes. So I updated within Wordpress itself (which to be honest worked trouble free for me, I just added, committed and pushed the updated files)

So I deleted the submodule, readded it and fetched all tags on my local setup. Now its working well, I can go to the submodule directory and checkout different versions of Wordpress based on the tags. However, if I say, checkout v3.8, go to my main directory, commit these changes and push them. When I go and pull the changes on my dev machine it hasn't updated the submodule head to point to this module.

Two problems here, I don't want to have to updated the version on all my different local and development environments, but further more if these changes are not being pushed, my deployment script deploys from the master git repo on Bitbucket, and it appears to ignore where I've just set the head on my project.

Could anyone help so that if I change the checked out tag on my local setup its reflected in the master repo for deployment purposes and on any other repo I pull or clone to?

هل كانت مفيدة؟

المحلول

It appears this won't happened automatically, but after a git pull from the root directory you can type...

git submodule update

Not sure why no one suggested that. In theory you could just do one command "git pull && git submodule update" if you wanted to do it one. Thats working for me now anyway.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top