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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:32:05+00:00 2026-06-15T17:32:05+00:00

I have a project where the data folder need to private (but tracked by

  • 0

I have a project where the data folder need to private (but tracked by VCS). So the entire git repo on GitHub is private. The code, however, is quite useful to many people and so I’d like to keep that public.

Currently my repo has only a master and dev. Once features in dev are working, they get merged into master. I’d like to create a no_data branch and have that push to a public GitHub repo. master should continue tracking the private repo. I already have a private GitHub repo for this (let’s call it private_project). I can create a public repo called project for the no_data branch.

Questions:
a) How do I set this up so each branch track a separate repo?

b) Since the only thing different between the two branches is that the public one will ignore the data/ folder, I just plan to add that in a .gitignore file. However, I’d like the rest of the code to stay the same in both branches. So I’m afraid that every time I merge master to no_data, I have to manually resolve the .gitignore merge.

  • 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-15T17:32:06+00:00Added an answer on June 15, 2026 at 5:32 pm

    Don’t. This is bound to result in an error on day or another.

    Make the data directory a submodule, with its own remote upstream repo (the ‘private_project‘ one), declared with its parent repo (which has the upstream repo ‘public_project‘).

    That way, you can push any branch of the parent repo to ‘public_project’: it won’t matter.
    All that the other contributors would get when cloning ‘public_project’ is the full repo plus a reference to another repo (‘private_project‘), which they can’t access (because it is a private repo).
    See “How exactly does git submodule work?“.

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

Sidebar

Related Questions

I have some data files in the resources/ folder for my Rubymotion project. How
In a project MyProject.Data, I have a folder named mappings with all mapping in.
I have file.txt data file in my project which is in resource folder. Now
In my asp.net project currently i have business logic and and data access code
I have a project called Data which is a data layer. In this project,
We have a project where data is written to a logging table. Now, when
I have a project for my Data Structures class, which is a file compressor
I currently have the following in one solution: Core Project (data access, biz logic,
I have a project for visualizing some data on tablet. I'll probably use android
In my current project I have data about colors. Each color is either a

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.