I am a newbie to git, i just decided to put all of my projects up on github. This is what i did:
- Went to my project directory
- Went to my github profile, created a new repository. Added a README file and did commit.
- On my command line did "git init" and "git add ."
- "git commit -m 'source code'" to commit all of my source code in the repo
- git remote add origin
- git remote -v
- And finally "git push origin master" to push the complete source code.
But for some reason, the commit i performed went to a branch called "main" which i never created. The README file i initially created is in the "master" branch. And when i went to the "compare and pull request" option, it showed this message:
There isn’t anything to compare.
main and master are entirely different commit histories.
Can someone please help me with this? What i want to do is add a new repository and put all of my source code in that repository along with a README file. I am not experienced with github
Thank You