Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7846541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:36:53+00:00 2026-06-02T17:36:53+00:00

I recently started using git and have a question. I have two branches of

  • 0

I recently started using git and have a question. I have two branches of a program, one which uses algorithm A and one which uses algorithm B. These algorithms do the same thing differently. Now, for each of these two branches I want to make different instances of the program which run for different sort of data (these can be up to 50 different instances). Before you ask, I can’t incorporate them all in the same program because of complexity and performance issues.

Additionally, if possible, I would like to be able to modify the core (i.e. the part of the source that is shared between all instances) and all instances to be updated with the change.

What method would you recommend to achieve that?

PS: Since my question may not be very clear, feel free to ask for any additional information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:36:57+00:00Added an answer on June 2, 2026 at 5:36 pm

    If they do the same thing differently, try to make them conform to a common interface/API. If you can do that, then apply the Bridge pattern The two implementations can just live in different subdirectories. You don’t really need git or branches do manage this–just have two different implementations of behind the Bridge and choose the correct impl at runtime (or compile-time, as it seems you prefer the compile-time approach).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently started using scons to build several small cross-platform projects. One of these
I've recently started using Git and am having trouble with just one thing. How
I recently started using WPF and the MVVM framework, one thing that I have
We have recently started using git and had a nasty problem when someone committed
I use git as my primary version control system, and have recently started using
I recently started using Git as my version control system for some Cocoa projects
I recently began using github and started playing with eclipse's git abilities, using some
We recently started using maven for dependency management. Our team uses eclipse as it's
I recently started using NERDTree with vim, and have set it to automatically open
I recently started using Emacs for editing. When I edit english-language files (like program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.