Not a valid object name: 'master'
Solution 1
Thanks for everyone.
I just had to define my email and username by these two lines and everything worked :
$ git config --global user.name "username"
$ git config --global user.email "[email protected]"
Solution 2
Try with this
git commit -m "initial commit"
git push -u origin
It will work. if you are facing any issues please share your error, so that we can find the issues and help you.
M Fuat
Enthusiastic about programming and life-long learning. Waking up early, very stubborn and nothing is impossible for me. Spending days with solving problems without giving up. Can't sleep if there is an unsolved problem. Interested in every new technology but focusing on WebApps (.NET Core) and Cross-Platform technologies. Love asking and comparing. I don't have "I can't" sentence in my dictionary. Interested in ML and AI but not yet dive into them. Love to read questions on StackOverflow and learn tiny important things about programming that no one knows.
Updated on June 04, 2022Comments
-
M Fuat almost 2 years
I created new directory test and CD into it
Creating new Repository into it :git init
Creating one text file test.txt and one directory with another text file inside it mydir/newfile.txt :
echo "Hello" > test.txt mkdir mydir echo "hello" > mydir/newfile.txt git add test.txt git add mydir/newfile.txt git commit
After these steps when i want to have a branch by writing :
git branch new_branch
I have the error :
fatal: Not a valid object name: 'master'
-
M Fuat about 8 yearsI had also the same message . Nothing different .