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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:24:43+00:00 2026-05-25T00:24:43+00:00

I tried to understand How to undo a commit and commit the changes into

  • 0

I tried to understand How to undo a commit and commit the changes into the other branch in Git? but I don’t think it has to be that hard. (Answer is using branch -f and stash and I don’t think I need those.)

I was working in my dev branch. Had two different commits in dirty working dir. Commit all changes in two different commits. Last commit is WIP (so dev material). Second to last is done and should be copied to stable branch.

I imagine something like

$ git copy e87568fa stable

but I’m pretty sure that’s not it.

Has cherry picking got something to do with it?

To be sure: I want the commit to stay on dev. So not mv it, but cp it.

I’m still baffled by all these GIT options and commands.

  • 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-25T00:24:44+00:00Added an answer on May 25, 2026 at 12:24 am

    Go to the stable branch:

    git checkout stable
    

    Copy the desired commit to the current branch.

    git cherry-pick e87568fa
    

    You can now return to dev:

    git checkout dev
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried using source control for a couple projects but still don't really understand
I've tried to understand some of the posts of similar, but don't quite understand
For years and years, I've tried to understand the part of Java specification that
I tried x = y ** e, but that didn't work.
I have tried to understand and use urlencode, but the problem can't be solved.
I've tried to understand this, and searched SO for similar questions, but I still
I recently tried to understand a C++ program that was written by somebody who
I tried to create a ValueType . I understand that creating a struct would
I have tried to understand but still not sure. If there is a constructor
I really do tried to understand the Von Neumann architecture, but there is one

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.