Solved: Why does `git branch` annotate a branch with `+` and another with `*`?

Question:

When I do git branch, it returns something like:

Best Answer:

This is because you’re using git worktrees.
  • * Whether or not you’re using worktrees, * (always) annotates the current branch you’ve checked out.
  • + Annotates the branch that’s checked out at your other worktrees.

like if I tried checking out feature33 then I would have got the following error:

fatal: ‘feature33’ is already checked out at ‘~/Dev/project/features’


If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com