Have you ever had to copy and paste from folder to folder when you uploading your projects to Github? There's nothing to be ashamed of, I used to do this (before). Is it efficient?
How about this? Follow me as I show you 7 easy steps to upload your react projects(or any project at all) to Github.
Note:
- If it's a react project, make sure to have created your react project with preferred Toolchain(e.g Create-react-app or NextJs).
- Create a repository with your intended project name
From the terminal/Command line, move into your project folder.
If your projects is the Documents folder, enter
> cd Documents/project-folder
Enter "git init".
> git init
Enter "git add . or git add -A"
> git add .
Enter "git commit -m "first commit".
> git commit -m "first commit"
Enter "git remote add origin github.com/username/reponame.git"
The dummy URL is the URL to your git repository which you can copy from github.
> git remote add origin https://github.com/username/reponame.git
Enter "git push -u origin master".
> git push -u origin master
Woo hoo! You've uploaded your project to github in just a few minutes.
I hope this article helps someone.