1

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)

JohnDoe
  • 2,422
  • 5
  • 29
  • 44

1 Answers1

1

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")
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • In retrospective it's obvious. I thought I can somewhat prevent forking when changing only one file. – JohnDoe Jan 03 '14 at 12:53