通过git status命令来查看当前分支的状态。运行git status后,你会看到类似以下内容的输出:

On branch branch-A
Your branch is up to date with 'origin/branch-A'.

nothing to commit, working tree clean

其中的 On branch branch-A 表示你当前所在的分支为branch-A