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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:09:47+00:00 2026-06-17T09:09:47+00:00

I have two repos, dev and testing. In dev, I’ve made several commits since

  • 0

I have two repos, dev and testing. In dev, I’ve made several commits since the last push to testing. However, now I want to shelve all those commits, make a different change, push it to testing, and then get those commits back. Shelving only works on uncommitted files.

What should I do? Backout or rollback or revert each commit in reverse order? Rename dev, clone testing to dev, make changes, push to testing, push to renamed dev, delete dev, rename renamed dev back to dev?

What’s the cleanest/easiest way to do this?

  • 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-17T09:09:48+00:00Added an answer on June 17, 2026 at 9:09 am

    For clarity to other readers: the actual HG shelve command is not the correct approach for this situation; it does not work on already-committed changes, but nor is it necessary to use in this case.

    Here’s what you can do:

    1. In dev, update to the version before the commits you don’t want to push to testing.
    2. Make your desired changes in dev and commit. This will create a new head (which will also be the new tip).
    3. Push to testing
    4. In dev, merge the tip with the other head that contains the changes you have avoided pushing, then commit.

    Original suggestion (not possible to implement in this case):

    1. Clone dev into a new repo and update to the version before the commits (or just clone testing instead)
    2. Make the change you want, commit and push to both testing and dev
    3. Discard the clone
    4. Pull the testing from testing into dev and merge the heads at your leisure, establishing a single head once more
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two local branches: master & dev. I want to force
I have two repos that I want to have different info associated with it.
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two update panels on a page. And I want to update both
I have two local mercurial repos, let's call them product and skunkworks. Skunkworks is
I have two repos: repo and repo-develop repo is meant for production and has
I have these two github repos, on both of which I'm an admin: https://github.com/ripper234/osqa
We have a two developer team and want use git. But I don't know
I've got two git project repos that have two or three files in common.
I have two bare repos super and a , one clone of super -

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.