Mubi
Mubi

Reputation: 21

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?

thanks in advance.

Upvotes: 2

Views: 739

Answers (2)

Adam Dymitruk
Adam Dymitruk

Reputation: 129526

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.

Upvotes: 1

VonC
VonC

Reputation: 1323125

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?"

Upvotes: 1

Related Questions