on my remote repository a new branch has been created. In GitBash in my Working Directory (on master branch) I type git remote update and git pull. To my understanding git remote update will update all branches set to track remote ones as explained here:
What is the difference between 'git remote update', 'git fetch' and 'git pull'?
So when I type git diff master newBranch --name-only I expected to see a list of files which are different in both branches. But instead I got the following error message:
fatal: ambiguous argument 'newBranch': unknown revision or path not in the working tree.
But if I type git checkout newBranch it works fine, and if I switch back to master by typing git checkout master suddenly git diff master newBranch --name-only works perfectly?
Could anyone explain to me this behavior?
 
     
    