简体   繁体   中英

How to push submodule changes to the local repo

I have a project in Git which uses mySQL as a submodule. What I'd like to do is update my local tree on all my computers with the changes I made on one of them inside my local copy of mysql tree. Is there a nice clean way to do that?

Trying to google I only saw posts asking about populating changes in submodules in the upstrem. I don't want to do that - I don't have right to do that and I don't need to.

When I'm working on my code all I do is:

git add . && git commit -m "Message" && git push

Will this be enough when going to the submodule directory and performing this command?

update my local tree on all my computers with the changes

That means settings up a local webhook listener, which would listen to a push even on your MySQL repository (assuming you are the owner of that repository, or fork).

That local listener can then trigger a git pull from within the submodule folder of each of your local repositories, assuming said submodule was set up to follow a branch .

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