I have installed Meld as diff tool in Git. Is it possible to compare two folders using Git or any other way? I tried the following command but nothing happened.
git diff /c/sample/folder1/ /c/sample/folder2/
If you want to compare two directories on your disk, no need for git
:
# use any suitable diff viewer : meld, kdiff3 ...
meld /c/sample/folder1/ /c/sample/folder2/
If you want to have a directory view for the diff between two commits in git :
git difftool -d <commit1> <commit2>
# you can also restrict this directory view to a subdir of your repo :
git difftool -d <commit1> <commit2> -- lib/
It actually is perfectly normal to compare different versions of folders in a git repository using git diff master..yourbranch path/to/folder
(see this question).
If it's not about versions, but just comparing two folders, meld can do it:
Meld lets you compare two or three folders side-by-side. You can start a new folder comparison by selecting the File ▸ New... menu item, and clicking on the Directory Comparison tab.
(from here).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With