I seem to have a problem with the git not initializing the master branch when creating a new local repository. When I run "git init", the master branch doesn't seem to be created. Here's the copy-paste from my command line
C:\Users\KJA\workspace\gitproblem>git init
Initialized empty Git repository in C:/Users/KJA/workspace/gitproblem/.git/
C:\Users\KJA\workspace\gitproblem>git branch
C:\Users\KJA\workspace\gitproblem>git branch mybranch
fatal: Not a valid object name: 'master'.
C:\Users\KJA\workspace\gitproblem>
Is there a bug in the newest version of git for windows or something?
Git init creates a repo without any commits.
Since a branch is a pointer to a commit, you can't have branches until you commit something.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With