Prafulla Prafulla - 4 years ago 91
Git Question

Finding diff between two git repositories

I have forked the git repository of a project on Github and made my own changes to it.
I wanted to get a diff between my repository and the original
repository that I've forked. Can someone tell me the git command
to get that diff?
I need to submit the diff for review.

Original repository:


My repository:

Here are the details from my

[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url =
[remote "mirror"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://

I tried looking at other posted questions regarding the same topic and
could not get it to work.

Any help would be highly appreciated.

Answer Source

Getting commit sha1 manually and using them in diff solved the problem!

[prafulla@prafulla-laptop .git] $cd refs/remotes/
[prafulla@prafulla-laptop remotes] $cat origin/trunk
[prafulla@prafulla-laptop remotes] $cat mirror/trunk 
[prafulla@prafulla-laptop remotes] $git diff 14f5fb7cba7bef466727a5b721c7c202e80e5dfd 1c4fa827f4fad2aad67a4fa5b57d88afe51d1559
.... diff follows!.......

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download