mkdir"ProjectFolder"
- Navigate to Github.com and create a new repository
- Enter the repo name
- Enter an optional description
- DO NOT create a README, .gitignore or license in this step
- Click on the Create repository button
- Navigate inside the created Folder in Terminal
cd ProjectFolder echo"# Heading for the README file" >> README.mdgit init(creates a new local repository)git add README.md(prepares the file in prepartion for versioning)git commit -m "first commit"(adds to version control)git remote add origin <newly created repo url goes here without the angle brackets>(start trackeing repo at given url location) gitgit push -u origin master(uploads all local commits to to Github, the -u flag sets the upstream)
At this point if all went well you should be able to refresh your Github page and see your newly created repo 🚀
The alternative approach would be to create the Github repo then use git clone <repo url> to your local machine using Terminal at a desired location. At this point you can add files, folders as needed and push to Github.