Thanks a lot. This worked finally.

On Friday, 6 August 2021 at 19:35:28 UTC+5:30 Magnus Therning wrote:

>
> "sharan....@gmail.com" <sharan....@gmail.com> writes:
>
> > Thanks, Magnus. I have pulled (git pull) before executing the 
> > command I showed.
> >
> > On your suggestion (git diff origin/master -- README)
> >
> > Do I need to specify the path to README or I need to be in the 
> > directory where README?
>
> Yes, in general you do need to be in your git workspace and 
> specify the relative path to the file you are interested in.
>
> For instance, the project I tried it out in looks like this:
>
> ❯ tree
> .
> ├── dev
> │   └── user.clj
> ├── docs
> │   └── development.org
> ├── project.clj
> ├── README.org
> └── src
> └── foo
> ├── core.clj
> └── utils.clj
>
> the file that contained changes wasn't README.org, but utils.clj, 
> so I ran
>
> ❯ git diff origin/main -- src/foo/utils.clj
>
> in order to see the differences.
>
> /M
>
> --
> Magnus Therning OpenPGP: 0x927912051716CE39
> email: mag...@therning.org
> @mag...@mastodon.technology http://magnus.therning.org/
>
> Every act of creation is first an act of destruction.
> — Pablo Picasso
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/5b307cc4-d02a-47dc-b082-49022cdda65en%40googlegroups.com.

Reply via email to