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 463299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:09:41+00:00 2026-05-12T23:09:41+00:00

Wasn’t really sure how to word the question … I have a project and

  • 0

Wasn’t really sure how to word the question …

I have a project and I’d like to have a version with code for shareware registration, activation, etc. and another version without this added code (i.e., an unrestricted version).

Having created two different versions, however, I’d like to continue working on the overall project; if I update code for one version I’d like the code to be updated in the other version.

Is this possible? Is this what people mean when they talk about creating “branches”? (If the answer is “yes,” then my question becomes “Is it possible to commit changes to one branch of a project and have the code simultaneously be committed to all branches?”)

Thanks, as always.

  • 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-05-12T23:09:42+00:00Added an answer on May 12, 2026 at 11:09 pm

    You could achieve this with source control branches, but it’s probably not the best way to do it. A better way would be via conditional compilation:

    void startup(void)
    {
        do_some_stuff();
    
    #ifdef RESTRICTED_VERSION
        do_check_activation();
    #endif
    
        do_some_more_stuff();
    }
    

    Then you compile your restricted version with -DRESTRICTED_VERSION

    You don’t say what language you’re using, but assuming it’s a compiled language it’s likely to have an equivalent to C’s #ifdef / -D system.

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

Sidebar

Related Questions

I wasn't sure how to word the question but I would like to step
I wasn't sure how to word this question, so i'll just explain. I want
I wasn't really sure how to title the question, but consider the following lua
I wasn't sure how to word this exactly. But I have a model that
I wasn't sure how to word the question for this topic...sorry. I'm just starting
I have a strange problem and I wasn't sure how to word the title.
Wasn't really sure how to search for this... I have a the following which
I wasn't sure what the best way to word this question is but basically
I wasn't really sure if this was the right site to put this question
I wasn't sure exactly how to phrase the question Title. I have this block

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.