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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:37:06+00:00 2026-06-11T10:37:06+00:00

I’d like to contribute to an open source project on Github. Before my workflow

  • 0

I’d like to contribute to an open source project on Github. Before my workflow was the following (no VCS used):

  1. I kept a ‘working’ folder and a ‘clean’ folder on my hard drive. I’ve update the reference version when there was a change and kept working on my ‘working’ version.
  2. When I wanted to do a pull-request I compared the files in a visual comparing program and went to Github.com / source / edit file, manually edited the different files and sent a pull request on the web interface.

Now I wanted to modernise this workflow (while avoiding Git) but I’m absolutely stuck after 5 hours of trial and error. I did the following:

  1. Forked the Github repro to my own
  2. Cloned the forked repro and edited the url to git+ssh://git@github.com to make pushes possible. Github – hg-Git – Mercurial works perfecly so far.
  3. Started editing on the forked repro like usual. Modified files, etc.
  4. Now what can I do if I want to submit a pull-request for some of my edited files? I’ve tried cloning into an other repro and only modifying there, but I didn’t see how could that help me.

So far the only idea I could come up with is to keep two forked repros on the hard drive, one ‘clean’ and one ‘work’. Then I would physically copy files from ‘work’ to ‘clean’ and only create a commit in the ‘clean’ repro from those files. But this seems to be such a ‘hackish’ way of doing things, I’m sure there must be a clean way with bookmarks / cloned repros or something elegant.

Can you tell me what would be the best workflow for sending selective pull requests using Mercurial?

  • 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-11T10:37:07+00:00Added an answer on June 11, 2026 at 10:37 am

    You can’t do a pull request that has only a part of changeset — changesets are non-separable in both Mercurial and Git.

    You also can’t push or pull (or request pull of) a changeset without pulling all of its ancestors too, so even committing two separate times, with different files each time, won’t get you what you want if you commit the stuff you don’t want to push/pull/submit before the stuff you do.

    Which is why you need to use feature branches to separate your submissions into logically distinct lines of development.

    If the upstream repo looks like this:

    [A]---[B]---[C]---[D]
    

    and you clone it so now you have this:

    [A]---[B]---[C]---[D]
    

    and then you make a changeset that has some stuff you want to submit as a pull request and some you don’t:

    [A]---[B]---[C]---[D]---[E]
    

    you’re out of luck. You can’t push a part of E without pushing all of it. You need to separate the stuff you want to push into one changeset (F) and the stuff you don’t (yet?) want to push (or request to have pulled) into another changeset (E):

    [A]---[B]---[C]---[D]---[E]---[F]
    

    You’re still out of luck because you can’t push (or request to have pulled F) without also including E, since E is an ancestor of F.

    Instead you need to make your E and F work siblings, not parent child. Like this:

    [A]---[B]---[C]---[D]---[E]
                         \
                          --[F]
    

    Now you can push F to your fork without E and can request that F be pulled in without them ever even seeing E.

    That branching command looks different whether you’re using Mercurial:

    hg clone THEIRS # now you have A through D
    ... work ...
    hg commit # now you created E, which you don't want to push
    hg update D  # current directory no longer shows E
    ... work ...
    hg commit # now you have F which is a child of D and a sibling of E
    hg push -r .    # send F (but not E)
    

    or git:

    git clone THEIRS # now you have A through D
    git checkout -b feature_e
    ... work ...
    git commit # now you have created E, which you don't want to push
    git checkout master # current directory no longer shows E
    git checkout -b feature_f
    ... work ...
    git commit # now you have created F, which you do want to share
    git push -u origin feature_f  # send F but not E 
    

    And now you’ll have a branch up there with only the F work and not the E work and can make the pull request you want.

    TL;DR: By the time you’ve mixed contributions and non-contributions in the same commit or branch you’re out luck. You need to separate them or create a patch and submit a patch rather than a pull request.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.