Go to a branch (e.g.
main), then run diff against another branch (e.g.
git checkout main git diff branch2
git diff master..develop
--name-onlyto only see the names of the files.
-- folderOrFileNameat the end to see the changes of specific files or folders.
- To compare the local branch with the remote one, then run
git fetch --allto fetch all remote branches, and run:
git diff --name-only [branchName]..origin/[branchName]
git diff --name-only develop..origin/develop.