How to make GitHub project part of a larger solution on a repository level?

I’m doing a project that will have these 3 components (all working together):

  • Custom server-side code
  • Custom client-side code
  • One 3rd party library that is a GitHub project (BSD licensed)

As part of the development, it is likely that I will make changes to the 3rd party library project and that I will want to contribute my changes back to the project owner, preferably via GitHub fork / pull request.

  • Configure git to allow cli push/pull without password prompt - netrc ignored?
  • Git Repository Too Large
  • git pre-receive hook - getting the newest code
  • List files modified for particular git commit
  • Can I make TortoiseGit remember by password? (using multiple BitBucket accounts)
  • force update the current branch - how?
  • The question is, how do I structure my repository (repositories) if I don’t want it to be entirely open-source and hosted on GitHub? If it were 100% closed-source, I would have one repository with 3 main folders, something like ServerSide, ClientSide and LibraryXY but I guess copying the contents of the 3rd party library to LibraryXY would make it difficult to contribute changes to it back to the project owner on GitHub.

  • git add, commit and push commands in one?
  • View commits that make changes to subfolder
  • ERROR: Error cloning remote repo 'origin'
  • git-svn clone | spurious branches
  • git merge from subtree folder in master to branch root
  • Software versioning with GIT
  • One Solution collect form web for “How to make GitHub project part of a larger solution on a repository level?”

    You can use either git submodule or git subtree commands.

    A submodule in a git repository is like a sub-directory which is really a separate git repository in its own right. This is a useful feature when you have a project in git which depends on a particular versions of other projects. see details

    Subtrees allow subprojects to be included within a subdirectory
    of the main project, optionally including the subproject’s
    entire history. For example, you could include the source code for a library
    as a subdirectory of your application. see details

    Based on your project structure, I would suggest you use git subtree

    Git Baby is a git and github fan, let's start git clone.