this post was submitted on 07 Jul 2023
3 points (100.0% liked)

Git

2868 readers
1 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS
 

I have a repository on github for a project that deals with importing/processing/sending reports to clients. There is now talk of creating a similar application for a different set of users, without the import part, but multiple send parts. The existing code base already has 90% of what the new application needs (and some extra that is not needed for this new project).

Should I fork the existing project and make the new project, or should I use the 'import project' function on github to create a new project based on the old project, or use the commandline to mirror the old project into a new project, or something else?

In future, there might be more projects that build on top of one of these projects with their own customizations, so I'm looking for a good approach that I can leverage again in future.

Please advise.

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (1 children)

Not sure I got the question right, but it sounds like you can benefit from code reuse via shared projects or packaging different parts of the code into chunks.

[–] [email protected] 2 points 1 year ago

That’s a good idea to think about, thank you

[–] [email protected] 2 points 1 year ago (1 children)

There is little difference between the three options you mentioned.

The only difference I can think of is that if you fork a repo on github, it will keep track of that and list the new repo undef the forks of the original one.

[–] [email protected] 1 points 1 year ago (1 children)

Got it, thanks. In the past, in similar situations, I would usually just create a new blank repository and manually copy the files I need from the old repository. Just wanted to see if there is a better/proper way

[–] [email protected] 2 points 1 year ago

Oh manually copying is worse than the other three options, because it will not retain the history of commits

[–] [email protected] 2 points 1 year ago

If the changes in one app will never be pulled into the other, completely separated would probably be fine but I’d personally just fork it due to sheer laziness.

load more comments
view more: next ›