There is a problem with the question. In that it is missing a step.
You actually need 3 steps to properly switch your working branch.
If you just do the 2 steps described in your OP then you are in for some pain.
For a simple explanation with minimal jargon, if you want to locally work on a branch called devA
the 3 steps are:
Step 1: git fetch --all
although you could technically fetch just this one branch. It is a good idea to get into a habit of always doing fetch --all
This command makes git find out the state of the online repository actually is. It generally should be done before any operation and many people run scripts that aggressively do this automatically every minute.
For example, if you just try to go to step 2 without doing fetch all first, then it could very well return an error that said branch does not actually exist. Or switch to an outdated version of it and falsely inform you that you are up to date with the online repository when in fact you are not. Thus tricking you into thinking you do not need to do step 3
Step 2: git checkout devA
this just switches your git to work on that branch. simple.
Step 3: git pull
this actually updates your currently worked on branch (see step 2) to match the online repository. If you do not do this then next time you try to commit changes you will accidentally break stuff.
Although if it is the very first time you ever checkout a branch on the current machine you do not need to use this command.
With all that in mind, going back to the original question
git fetch && git checkout
= first find out what the state of the repository is. then switch to a branch.
git checkout
= without bothering to find out what the state of a repository is, try to switch to a branch. This could tell you the branch does not exist. Or it could switch to an outdated version of the branch while falsely telling you that it is up to date with the repository.