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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:02:23+00:00 2026-05-30T10:02:23+00:00

I would like to maintain two forks of a project: one for internal use

  • 0

I would like to maintain two forks of a project: one for internal use at the company and another one for opensource. I’d like to have all deploy-specific elements in the source tree (like the deployment recipe and the database configuration and a version-specific bootstrap file and so on).

The way I envisioned it was that i’d have two branches, for example master and internal. In that case one thing I’d like to prevent is pushing the internal branch to Github since that would contain sensitive information. I’d then cherry-pick changes from the internal branch into master.

So how do I configure remotes that a branch is pushed to it’s default remote? I have to setup that branch to track another remote than Github?

Or is there a better workflow to developing two forks in lockstep for this kind of situation?

  • 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-30T10:02:24+00:00Added an answer on May 30, 2026 at 10:02 am

    Once someone has cloned your repo, he (or she of course) has full access to all branches stored in the repo. You cannot prevent him (or her of course) from pushing the complete repo to somewhere or even make the sources public on the internet.

    If you want to keep secret things secret, set up two repos, one for master and one for internal and then cherry-pick the needed commits from internal to master like you intended to do.

    To achieve this, add the internal repo as remote to the master repo. While being on master do

    git remote add internal /path/to/internal
    

    When you want to take commits from internal to master, simply fetch the latest revisions of internal into master

    git fetch internal
    

    then check the commits to be taken and cherry-pick them using

    git cherry-pick <SHA1>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two resize functions that I would like to perform one after the
I have a lot of different UserControls and would like to maintain consistent UI
We use Oracle on a project and would like to also support MySQL. How
I would like to know how I can maintain the scroll position when I
I would like to create an auto increment function that allows me to maintain
I would like to know if it is possible to maintain an authentication (like
I would like to maintain a list of objects that is distributed between N
I have an existing data model. I would like to express this data model
How do you maintain two (or more) versions of a project in SVN? different
I have a database structure that has two one-to-many relationships. I have a website,

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.