Merge 2 same repository GIT

experts on stackoverflow..

I’m new on git, develop C# project with small team. assuming the project need contribution from freelancer, i lock important part of my code by create the DLL, and create a new GIT repo for that project with DLL for freelancer to work on it. what i want to know is, how to merge the freelancer repo with my repo if we edited the same file? is it OK using submodule on git?

  • can I change the description of the past git commit?
  • git-svn and local branches
  • Summary of changes in several Git commits
  • How to make bash suppose all commands to be git commands?
  • Collaborative programming with Git
  • How to remove unwanted files (like meta data) from Git branch on github
  • thanks in advance.

  • git - remove file from the repository
  • Cloning a Partial Perforce Repo with git-p4
  • Git submodules workflow
  • Cloud build failing on git submodules
  • CtrlP: ignore files in subdirectory within a git repo
  • Which commit has this blob?
  • 2 Solutions collect form web for “Merge 2 same repository GIT”

    If the DLL can be developed at a different pace (with a different lifecycle) than your main code, then submodule is better: it allows you to reference a fixed revision of said DLL developed in its own repo.

    If the two set of files are tightly linked (you cannot change one without having to change the other), the subtree strategy is better (see subtree merging or subtree merge).

    See “How do you merge two git repositories?”.

    If you choose submodules, you still can subtree merge said submodule in your repo: see “Git commands to automatically subtree merge a project with submodules?”

    I would use a submodule to house an obfuscated DLL for him to use. All you have to do is allow him to push his own branch to the outer repo and coordinate like that.

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