0

In my web app project I have Google minify set up as a git submodule; the idea is that I can keep the minify library up to date by simply running git submodule update. My problem is I have made local changes to the minify config.php file which I want to publish as part of my app... but how can I commit this change to the super-project?

Other sources (e.g. How do I “commit” changes in a git submodule?) say I need to commit and push the submodule first, but obviously I'm not going to push the changes in my config file to the public minify repository.

What's the best way of handling this sort of set up... I imagine it should be quite common but cannot find any solid recommendations.

Community
  • 1
  • 1
John J. Camilleri
  • 3,372
  • 4
  • 28
  • 38

1 Answers1

2

I suggest you to "fork" the Google minify project, that way you'll get your own copy. You'll be able to push fixes on it and to update it from an upstream remote (this is the common name). Finally, your submodule will point to your copy.

About the upstream remote, it should point to the Google minify repository, and the origin remote will point to your copy. This is a kind of convention. You always pull new commits from the upstream, and you'll push new commits + your fixes to the origin.

This is a clean way to manage this sort of set up.

William Durand
  • 5,199
  • 1
  • 24
  • 37