Gabrielizalo
Gabrielizalo

Reputation: 946

Recommendation of git configuration for 2 projects

I am new with Git and I need some help to configure two projects. Can you give me some recommendations? Basically I have a father project (a template I bought) and I need to copy this template to do my own customizations.

Then how I can work with Git to have a project clean with all the fixes of the template, and other project with my own customizations (that I can added the fixes of the template project).

Is it a Git project with a branch or is it a Git project with a fork? Or any other way?

Upvotes: 0

Views: 75

Answers (2)

Jan Hudec
Jan Hudec

Reputation: 76376

There is no distinction between "fork" and "branch" in in Git. Git history is a directed acyclic graph of revisions (commits), that can be replicated over any number of repositories and there are named pointers, refs, marking the significant revisions (tags) and points on which new development is done (heads, also called branches).

What you want to do is called fork, but the distinction is by intention. Branch is in a project intended to be eventually merged or to fix a bug in an older release while new release is being developed, while fork is separate project whose development diverges from the original and may or may not integrate changes in the original project.

Now technically, you'll have your own repository created by cloning the "upstream" project. Github calls this a "fork".

In this repository you will have a branch (ref) tracking the upstream repository. This often named upstream and is also called a "vendor" branch using old CVS terminology.

Than you will have another branch with your modifications. It should probably be simply master. Depending on what you want you will either periodically merge upstream into it to follow all upstream development or just cherry-pick few changes now and then if you want to continue development in different direction.

Upvotes: 2

remram
remram

Reputation: 5202

These should be branches.

Please refer to the documentation before asking questions about standard git workflows/concepts, there are lots of great articles around that will illustrate these. See for instance Git Branching in the Pro Git book.

Upvotes: 2

Related Questions