Hi,
When initializing with git init, I want to be able to get the branch name before I've made a commit. I'm pretty sure git branch won't return it.
It looks like git status --porcelain --branch does, it returns a ## No commits yet on main. But I'm not sure how to replicate this in git2? Hopefully I just missed something simple.
Thanks for your time.
Hi,
When initializing with
git init, I want to be able to get the branch name before I've made a commit. I'm pretty suregit branchwon't return it.It looks like
git status --porcelain --branchdoes, it returns a## No commits yet on main. But I'm not sure how to replicate this ingit2? Hopefully I just missed something simple.Thanks for your time.