Github problems galore

The first problem was my fault. Recently setup SSH and tested it but realized that now that I want to use it I didn’t remember how. Basically everything in the git flow is the same as before, except after you do the “git push -u origin master”, which is what I copy/pasted from my notes…it will ask you for your ssh password. Then I kept entering my github password instead of the github ssh password. After I did that it worked.

However that leads me to my second problem. Afterwards I didn’t see my repository on github. Now my little brain seemed to remember reading something about the default branch changing. After a little research I realized that the above command I used “git push -u origin master” should have been “git push -u origin main”. Because the Branch default had changed from master to main. Why? IDK! But before I could enter that command, I had to enter “git branch -M main”. Also just for the record there was a dropdown on the apparently empty repository where I could have chose master and it would have shown.

I honestly don’t completely understand all this branch stuff. I know I would if I was using git in a job setting where you actually would be working with others. But I’m just a lone programmer working on personal projects. I see the value of git but I don’t think I’ve ever used it to restore a repository. I usually use my own backups and directory/file zips.