git checkout -b foo
switches on foo
branch (even if it doesn't exist, it is created), but if the foo
branch already exists it throws an error like this:
fatal: A branch named 'foo' already exists.
What's the command that does the following check?
git checkout foo
)git checkout -b foo
)