Вопрос

I would like to use swagger (https://github.com/wordnik/swagger-ui) as part of my project. Using swagger requires editing one file. Can I add a submodule and make edits to certain files, commits and push to my public repo instead of upstream?

I used to use subtrees for that but out of a sudden subtrees stopped to work (another issue, identical to https://jira.atlassian.com/browse/SRCTREE-2000)

Это было полезно?

Решение

I would rather fork wordnik/swagger-ui, and declare that fork as a submodules.

That way, I can:

  • make edit within that submodule, add, commit and push to my fork
  • go back to the parent repo, add and commit in order to record the new SHA1 of my submodule.
  • in my submodule, I can fetch the original repo wordnik/swagger-ui, and rebase my own branch on top of 'upstream/master', in order to keep up-to-date with the latest evolutions.
    (as described in "Pull new updates from original Github repository into forked Github repository")
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top