The "current branch" in git
Hello! I know I just wrote a blog post about HEAD in git, but I’ve been
thinking more about what the term “current branch” means in git and it’s a
little weirder than I thought.
four possible definitions for “current branch”
It’s what’s in the file .git/HEAD. This is how the git glossary defines it.
It’s what git status says on the first line
It’s what you most recently checked out with git checkout or git switch
It’s what’s in your shell’s git prompt. I use fish_git_prompt so that’s what I’ll b...
Read more at jvns.ca