Reputation: 120
Here is scenario:
I'm working on some project where I use some library. I found a bug in library filled bug report but don't want to wait for library author to fix it. I've looked in source code and found that I could add workaround which will work for me (but probably not for all people using this library).
I want to add this project (it's on github) to mine, fix a bug and when author will make official bugfix then replace it with library from package manager.
It looks like place to use git submodules but how to pass fix to co-workers without pushing change to original repo?
Upvotes: 1
Views: 43
Reputation: 12295
Lukas-reineke has the right idea.
You should fork the github project and then fix the bug. Then do two things:
Send a pull request to the owner of the project. They're usually quite happy to accept bug fixes, as long as the fix meets the contributing guidelines.
You'll need to build and package your fork. Based on which packaging technology you're using (npm, nuget, etc) this process will defer. You'll then need to distribute this custom version of the dependency package so that your colleagures and your build server can access it. The easy way would be to check it in with your repo, but it would be better to host it in an internal package repo.
Once the original library author accepts your fix and release a new official package, you can go back to using their version.
Upvotes: 1