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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:28:29+00:00 2026-05-12T11:28:29+00:00

I’m contributing to a fairly small open source project hosted on Github. So that

  • 0

I’m contributing to a fairly small open source project hosted on Github. So that other people can take advantage of my work, I’ve created my own fork on Github. Despite Github’s choice of terminology, I don’t wish to totally diverge from the main project. However, I don’t expect or desire that all of my work is accepted into the main repository. Some of it however, already has been merged into the main repository and I expect this to continue. The problem I am running into is how best to keep our two trees in a state where code can be shared between them easily.

Some situations I have or will encountered include:

  • I commit code that is later accepted
    into the main repository. When I pull
    from this repository in the future,
    my commit is duplicated in my
    repository.
  • I commit code that is never accepted into the main repository. When I pull from this repository in the future, the two trees have diverged and fixing it is hard.
  • Another person comes along and bases their work on my repository. Thus, I should if at all possible avoid changing commits that I have pushed, for example by using git rebase.
  • I wish to submit code to the master repository. Ideally, my changes should easily be able to be transformed into patches (ideally using git format-patch) that can directly and cleanly apply to the master repository.

As far as I can tell there are two, or possibly three ways to handle this, none of which work particularly well:

  • Frequently run git rebase to keep my changes based off the head of the upstream repository. In this way I can eliminate duplicated commits but often have to rewrite history, causing problems for people wanting to derive their work from mine.
  • Frequently merge the upstream repository changes into mine. This works ok on my end but does not seem to make it easy to submit my code to the upstream repository.
  • Use some combination of these and possibly git cherry-pick to keep things in order.

What have other people done in this situation? I know my situation is analogous to the relationship between various kernel contributors and Linus’s main repository, so hopefully there are good ways to handle this. I’m fairly new to git though, so haven’t mastered all it’s nuances. Finally, especially due to Github, my terminology may not be entirely consistent or correct. Feel free to correct me.

  • 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-12T11:28:29+00:00Added an answer on May 12, 2026 at 11:28 am

    Some tips I’ve learned from a similar situation:

    • Have a remote tracking branch for the upstream author’s work.
    • Pull changes from this tracking branch into your master branch every so often.
    • Create a new branch for each of the topics you’re working on. These branches should generally be local only. When you get changes from upstream into master, rebase your topic branches to reflect these changes.
    • When you’re done with some topic work, merge into master. This way, people who are deriving work from yours, will not see too much rewritten history, since the rebasing occurred in your local topic branches.
    • Submitting changes: Your master branch will basically be a series of commits, some of which are the same as upstream, the rest are yours. The latter can be sent as patches if you want to.

    Of course, your choice of branch names and remotes are your own. I’m not sure these are exhaustive to the scenario, but they cover most of my hurdles.

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

Sidebar

Ask A Question

Stats

  • Questions 202k
  • Answers 202k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Is this a correct behavior ? (I was thinking it… May 12, 2026 at 8:17 pm
  • Editorial Team
    Editorial Team added an answer There are a lot of ways to do this. You'll… May 12, 2026 at 8:17 pm
  • Editorial Team
    Editorial Team added an answer There is a Connect bug filed on this as well… May 12, 2026 at 8:17 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.