[Ruby] 【Git】fatal: Not a valid object name: ‘master’.

less than 1 minute read

Error when trying to branch using Sourcetree. The main operation is Sourcetree.

The contents were simply “There is no object named’master’”.

There is no problem because the “init” in the terminal operation has been made at the time of creating the file.

Because it’s because I can not commit Open the created file with VScode’s editor Create a file called sample.txt If you give a character string (← because not only creation but also change is required) ok

After that, it is displayed in the history, so If you commit, you will be able to branch.

You can’t branch before you make some kind of file.