top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to know the two commit is the same in Git

0 votes
43 views

I have two commit in different branch, the commit-id is different, but and the content is the same, is there a method to prove its the same use one-liner.

posted Jun 8, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

If you want to see all changes to the file between the two commits on a commit-by-commit basis, you can also do

git log -u $start_commit..$end_commit -- path/to/file
answer Feb 24, 2014 by Amit Kumar Pandey
Similar Questions
+5 votes

I know form the "git log" we can now the commit time, but how to know when it is in the remote git server.

0 votes

I want to retrieve the commit history of a given file.What command should I issue? I expect the command like below.

D:GitTest> git show --commit-history test.txt
8194aaa
c419234
...
0 votes

There are shorthands for going back from HEAD, but not for the initial commit, AFAICT.

I often want to do this when rebasing, and have come to tagging the initial commit in my repos with INITIAL.

Is there a better syntax I'm missing?

+2 votes

Can someone help me on how to delete an intermediate commit?

+1 vote

I have added some changes on commit message in prepare-commit-msg file and then I exec this command

git config --global commit.template .git/hooks/prepare-commit-msg  

After that when I do git commit I receive something like this

40 lines of my changes and then  

# Please enter the commit message for your changes. Lines starting # with # will be ignored, 
  and an empty message aborts the commit. # Explicit paths specified without -i nor -o; 
  assuming --only paths... # On branch master # Changes to be committed: # # modified: test #  

Question is there any chance to show this default message on the top? Or better permanently remove this message?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...