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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:42:54+00:00 2026-06-07T15:42:54+00:00

I have a slightly outdated experimental branch, that was pushed aside due to time

  • 0

I have a slightly outdated experimental branch, that was pushed aside due to time constraints. I need to pick it up and move it to the HEAD of the project.

Now the problem is that the patches in the branch are actually sort of big with huge amount of collisions, so I would like to break the commits in the branch into single file commits, so I can more easily apply them one by one.

Is there some automatic command, that would do this for me, or do I need to do this manually?

  • 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-07T15:42:55+00:00Added an answer on June 7, 2026 at 3:42 pm

    You can do it with:

    git checkout -b experiment master^^^^
    git rev-list master^^^..master | 
      while read rev; 
      do 
        git diff --name-only $rev^..$rev | 
          while read file; 
          do 
            git checkout $rev -- $file;
            git add $file; 
            git commit -C $rev;
          done; 
      done
    

    please note the number of ^s in each statement

    this assumes that you want to expand the range master^^^^..master and it is linear history or you don’t mind losing merges. It also assumes you want to keep the same commit message for the files affected each time.

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

Sidebar

Related Questions

I have a need for two slightly different classes, that have the same members,
I have a slightly odd problem that I think is most likely due to
I have a slightly theoretical question that I want to clear up before I
I have a slightly complex problem here. I need to show to the client
I have slightly simplified the default index.php file supplied with WAMP, so that it
I have two Activities that both list items in a table. For the time
I have slightly altered the architecture of our application, and IWindsorContainer is no longer
I have a slightly modified version of the thread class copied off the Linux
I have a slightly odd situation. One of my customers has an Asp.net (v2
I have transactional replication running between two databases. I fear they have fallen slightly

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.