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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:04:57+00:00 2026-05-27T12:04:57+00:00

When using git, is there a way to show commits made to a branch,

  • 0

When using git, is there a way to show commits made to a branch, while ignoring all commits that were brought in by merging?

I’m trying to review the code changes made on a branch while ignoring the ones we made on other branches that were merged in. I know it’s damn near impossible to show a diff in that fashion, but I’d like to be able to find out which commits I need to review.

  • 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-27T12:04:57+00:00Added an answer on May 27, 2026 at 12:04 pm

    --no-merges

    Both parents have equal weight in many contexts in git. If you’ve always been consistent in merging other changes in then you may find that this gives you what you want.

    git log --no-merges --first-parent
    

    Otherwise you may be able to exclude commits from other named branches.

    git log --no-merges ^other-branch-1 ^other-branch-2 ^other-branch-3
    

    If you want to review the changes that you are going to merge back into a principal branch then the easiest thing to do is to perform the merge on a local clone and then just look at the diff with the first parent before publishing the merge.

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

Sidebar

Related Questions

I'm trying to get started using Git and TortoiseGit. Is there a way to
Is there a Python way without using a subprocess to clone a git repository?
Is there any way to remove a file using git gui then commit and
If you're using Git from the command line, is there a way to delete
Some Background I have been using Git for a while now. The projects that
Is there a way to tell git to ignore a file that's stored in
I read a similar question about this that suggested using git log --graph --all
Is there a good way to use git to identify all the modified functions
tl;dr : Is there a way to get Git to permanently exclude all working-copy
I'm using git for a PHP project, I think it's really handy. There is

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.