Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any automatic way to update the parent git repo to point to the latest commit of its submodule?

Every time I push a commit to the submodule I need to update the parent repo to the latest commit in the submodule. Is there any automatic way to do that in the remote?

Every time push a commit in the submodule repo i want the parent to automatically point to the latest commit of the child repo. Please suggest if its possible and how?

like image 641
Nabashree Banerjee Avatar asked Sep 02 '25 11:09

Nabashree Banerjee


1 Answers

Using gitlab-ci in the submodule, I was able to trigger the parent to automatically update the master branch in parent when a merge request for the submodule master branch is completed.

stages:
  - build

build_job_dev:
  stage: build
  variables:
    PLUGIN_NAME: coppercrm  
  trigger:
    project: Plugins/parent
    branch: development
  only: 
    - master

I hope this could help someone who is looking for updating parent repo whenever a submodule updates

like image 175
Sumanth Singh Avatar answered Sep 11 '25 02:09

Sumanth Singh