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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:36:35+00:00 2026-05-16T01:36:35+00:00

I am using Git on Ubuntu 10.04 (Lucid Lynx). I have made some commits to

  • 0

I am using Git on Ubuntu 10.04 (Lucid Lynx).

I have made some commits to my master.

However, I want to get the difference between these commits. All of them are on my master branch.

For example:

commit dj374
made changes

commit y4746
made changes

commit k73ud
made changes

I want to get the difference between k73ud and dj374. However, when I did the following I couldn’t see the changes I made in k73ud.

git diff k73ud..dj374 > master.patch
  • 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-16T01:36:36+00:00Added an answer on May 16, 2026 at 1:36 am

    Try

    git diff k73ud^..dj374
    

    to make sure to include all changes of k73ud in the resulting diff.

    git diff compares two endpoints (instead of a commit range).
    Since the OP wants to see the changes introduced by k73ud, they need to differentiate between the first parent commit of k73ud: k73ud^ (or k73ud^1 or k73ud~).

    That way, the diff results will include changes since k73ud parent (meaning including changes from k73ud itself), instead of changes introduced since k73ud (up to dj374).

    Also you can try:

    git diff oldCommit..newCommit
    git diff k73ud..dj374 
    

    and (1 space, not more):

    git diff oldCommit newCommit
    git diff k73ud dj374
    

    And if you need to get only files names (e.g. to copy hotfix them manually):

    git diff k73ud dj374 --name-only
    

    And you can get changes applied to another branch:

    git diff k73ud dj374 > my.patch
    git apply my.patch
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

git version 1.7.4.1 I am using git on Ubuntu. I have copied some files
Using Git Bash, I just edited some commits. In the shell it says: Successfully
I want to develop on 2 systems - using Linux (ubuntu) for server/git repo
I'm using Git under Ubuntu Linux to sync and deploy my projects. I have
I am using ubuntu 11.10 machine. I have installed git of version 1.7.7.1. I
Using Git, my editor for commits is Vim. I'm constantly doing a poor job
Using Git, how can you find the difference between the current and the last
I am using git-svn (from cygwin) and I've done several git commits on my
I have two issues. I have Ubuntu 10.10 and I have installed git server
I just started using Ubuntu Linux for the first time. I know the GIT

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.