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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:43:39+00:00 2026-05-29T10:43:39+00:00

I am still not clear in this: I want to fetch code from opensource

  • 0

I am still not clear in this:

I want to fetch code from opensource project and contribute. But I want to make my private changes also, with possibility to contribute with publicly useful parts of code and make private changes in local repos.

I guess, the way will be:

  • clone remote repository
  • create a branch for remote version of code “project”
  • create local branch “customs”, where my customizations will be
  • “master” will be my finished customizations

Is then possible to remove some part of original code from my branch “customs”, witch will not be automatically synchronized from “project” again, but I still will be able to do contributions for original project? How can I do that?

  • 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-29T10:43:39+00:00Added an answer on May 29, 2026 at 10:43 am

    You could do the following:

    • Clone the repository.
    • The master branch should always be exactly the same as the original master branch. (Even though Git can still access the original master branch by using “origin/master” as a branch name if you need one I would still recommand to keep a local branch with it around. It’s a matter of taste, though.)
    • Create a branch for your customization; here you can modify everything to your heart’s desire, remove stuff, change stuff, whatever. Your changes here are not touched by what happens in the original repository unless you tell Git to. This branch can be pushed to a public repository if you want — if you don’t want anyone to see it, that’s fine, too.
    • Create one or more branches for your public modifications. These branches should be pushed back to the public repository so that the original project can benefit from your modifications if they so choose. If they do, your branches will end up being merged into master.
    • Now, finally, create a branch for your local build which will contain the original master branch, and both of your modified branches. I recommend not getting attached to this branch at all but recreate it every time you modify one of the other branches. This will guarantee that this branch (and your local build) will always contain a clearly defined state. I normally use the following sequence of commands to achieve this:
    git checkout local
    git reset --hard master
    git merge my-public1 my-public2 my-private1 my-private2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read a few posts on this, but there's still one thing that's not
I'm still not clear on the purpose of annotations in Java. Initially I thought
I'm still not sure I totally get how this particular case should work out.
I'm still not sure this is the correct way to go about this, maybe
I have done some work with Ruby on Rails but am still not comfortable
I've read up on this on MSDN forums and here and I'm still not
I'm not sure if the title is very clear, but basically what I have
I have been struggling with this for long. I read many resources but still
I've looked at a few questions here, notably this one but I'm still confused.
I'm still not practiced in oop.. now I know the importantness of it :)

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.