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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:08:23+00:00 2026-05-26T03:08:23+00:00

I’m having a couple of branches, corresponding with abandoned or later postponed development, some

  • 0

I’m having a couple of branches, corresponding with abandoned or later postponed development, some of them are pure garbage. I use

git log master..mybranch

to find out what’s mybranch all about, but the lists are usually needlessly long, since they contain also commits contained in master, just in a different order. This comes from master having been rebased.

When I try to rebase mybranch on top of master, I get conflicts caused by this reordering. Such conflicts are not worth resolving, as it takes time and leads to a result already known from master.

So what I need is a way to get rid of such commits in mybranch, so that only the important commits remains and the branch can be rebased more easily.

  • 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-26T03:08:24+00:00Added an answer on May 26, 2026 at 3:08 am

    I think what you are looking for is git cherry. This generates sha1 values from the commit body rather than using the git commit id to compare commits. This makes it independent of the commit ordering. You use it to find commits which might be worth adding from one branch to another.

    An example from the msysGit development tree might help. We have an old branch ‘work/symlink’ which may have been merged to the ‘devel’ branch sometime past. So:

    pt111992@UKNML4132 /git (devel)
    $ git cherry devel origin/work/symlink
    + 7fe3fde1d9b93472faeedb75bfd930825a5abe06
    - aebecb0d31e4a546cf4d21d32e82cc852b6057bb
    + 1b467d086fd6601cd2feb34d59baf1e804f70acb
    + 3e735a0bfda6b91ae7cbb20c2c89818405c5bea9
    + d4db723c482ba4d2fd7539060834d231c35cdf53
    

    This says there are 5 commits of interest (which we can also work out from the log output):

    $ git  log --oneline devel..origin/work/symlink
    d4db723 Place __stdcall between return value and function name
    3e735a0 mingw.c: Use the O_BINARY flag to open files
    1b467d0 Test for WIN32 instead of __MINGW32_
    aebecb0 Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++
    7fe3fde Support UTF8<=>Unicode filename mapping
    

    Thats the commits present on ‘work/symlink’ and not on ‘devel’. The git cherry output suggests that the aebecb0 commit is already applied to ‘devel’ (from the leading minus) but the others might be worth looking into. We can check that this commit is only present on the work branch:

    $ git branch --all --contains aebecb0
      remotes/origin/work/symlink
    

    but we can also find the commit id it got merged into the devel branch with by searching for the commit message using git log --crep to see that this one was really picked into devel.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.