Difference between file in local repository and origin

I want to find the differences between a file I have in my local repository vs. what is in the origin master.

I know that there is git diff. However, I just want to isolate it down to this one particular file.

For simplicity, let’s say the file is named file1.txt and it has a local file path = [local_path] and in the origin it has filepath = [remote-path].

What would be the Git command I need to type?


For those that are using Eclipse, I just found out that you can just right click → Compare With → Branch, Tag or Reference → select the appropriate version and there you go.

7 Answers
7

Leave a Comment