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

  • Home
  • SEARCH
  • 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 8177279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:28:07+00:00 2026-06-06T23:28:07+00:00

In git, I have a master branch, where I am developing my application. Along

  • 0

In git, I have a master branch, where I am developing my application.
Along with the application I need to develop a demo version of it.

I thought about creating a separate branch for demo that would never be merged into the master.
The main problem is that I expect to develop some features that would be common both for application and demo.

What would be the right strategy to deal with that problem? Is there any way to “share” commits in git?

  • 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-06T23:28:09+00:00Added an answer on June 6, 2026 at 11:28 pm

    If your demo version can’t be defined using configuration, then yes you should use a branch.

    The fact that you won’t merge it into master doesn’t prevent your from merging from master (or other branchs) into your demo, so you can propagate your new features into your demo branch without difficulty.

    The way to “share commits” is to

    1) commit into master or into a branch dedicated to your feature

    2) go into your demo branch (git checkout demo)

    3) import the code from your other branch (this won’t erase what makes your demo branch special) using git merge master or git merge myfeaturebranch

    A merge doesn’t mean your destination branch is identical afterwards to the source branch.

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

Sidebar

Related Questions

I have a Git repository which I have started to develop on master branch
Most git repositories have a master branch, but there's really nothing special about this
We have a git based project with a friend and one master branch. He
I have a git repo with a dev and a master branch. Now I
I have a simple Git repo with non-branching commits in the master branch. I
I have a file in my master git branch called 'Readme.' The file has
I have a git branch that is based off an old master. This branch
I have a branch called experiment. git checkout master echo 'some changes' > a.txt
I'm using git. I have a branch, apifixes , that was branched from master
I'm pretty new to Git. Right now I only have a master branch for

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.