magit diff range on folder

20 views
Skip to first unread message

Christian Barthel

unread,
Jul 10, 2021, 3:53:09 AM7/10/21
to ma...@googlegroups.com
Hello,

is it possible to do a diff on a subfolder within magit (and
exclude all other changes)?
At the moment, I am using `d r', but this gives me a complete
list of all changes. I'd like to narrow this down to one
folder.

In git(1): "git diff ref1..ref2 ./folder"

Thanks!

--
Christian Barthel

Tim Visher

unread,
Jul 10, 2021, 9:02:04 AM7/10/21
to Christian Barthel, magit
Hi Christian,

On Sat, Jul 10, 2021 at 3:53 AM Christian Barthel <b...@online.de> wrote:
is it possible to do a diff on a subfolder within magit (and
exclude all other changes)?
At the moment, I am using `d r', but this gives me a complete
list of all changes.  I'd like to narrow this down to one
folder.

In git(1): "git diff ref1..ref2 ./folder"

Is `d -- ./folder RET r ref1..ref2` what you're looking for?

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es
 

Christian Barthel

unread,
Jul 10, 2021, 3:43:10 PM7/10/21
to Tim Visher, magit
On Sat, Jul 10 2021, Tim Visher wrote:
> Is `d -- ./folder RET r ref1..ref2` what you're looking for?

Yes! Thanks a lot.

--
Christian Barthel

Tim Visher

unread,
Jul 11, 2021, 10:11:51 AM7/11/21
to Christian Barthel, magit
On Sat, Jul 10, 2021 at 3:43 PM Christian Barthel <b...@online.de> wrote:
On Sat, Jul 10 2021, Tim Visher wrote:
> Is `d -- ./folder RET r ref1..ref2` what you're looking for?

Yes!  Thanks a lot.

Glad that helped! FWIW `--` is a fairly common idiom amongst the various Magit popup windows that are fronting git commands that use that on the CLI. 
Reply all
Reply to author
Forward
0 new messages