An alternative to the answer by @Marco Ponti, and avoiding the checkout:
git diff --name-only <notMainDev> $(git merge-base <notMainDev> <mainDev>)
If your particular shell doesn’t understand the $() construct, use back-ticks instead.
More Related Contents:
- Branch from a previous commit using Git
- What exactly do we mean by “branch”?
- How do I clone a single branch in Git?
- Default behavior of “git push” without a branch specified
- Track all remote git branches as local branches
- Using the slash character in Git branch name
- Why do I have to “git push –set-upstream origin “?
- Vendor Branches in Git
- How can I search Git branches for a file or directory?
- Forking vs. Branching in GitHub
- How do I get the current branch name in Git?
- How do I create a remote Git branch?
- How do I delete all Git branches which have been merged?
- How do I merge my local uncommitted changes into another Git branch?
- How to commit my current changes to a different branch in Git [duplicate]
- Pull a certain branch from the remote server
- Reordering of commits
- Does deleting a branch in git remove it from the history?
- How do you remove an invalid remote branch reference from Git?
- Git branch strategy for small dev team [closed]
- Delete local Git branches after deleting them on the remote repo
- How to protect “master” in github?
- How to get default Git branch?
- How do I list all remote branches in Git 1.7+?
- Pull all commits from a branch, push specified commits to another
- View differences of branches with meld?
- How do I manage conflicts with git submodules?
- How to ‘git pull’ into a branch that is not the current one?
- Git: How to list commits on this branch but not from merged branches
- Commit a file to a Different Branch Without Checkout