GIT: How to detect to which branch the current folder belongs to?

  • How to detect to which branch the current folder belongs to?
  1. Open CMD and browse to the desired folder
  2. Run
git name-rev --name-only HEAD

br_name

Note: There are two dashes — before “name-only…”

Leave a comment