This repository will tell you how to upload multiple Folders or a Project to GitHub repository.
- Open Git Bash CLI.
- Navigate to the desired Folder or Project.
cd /path/to/your/project
- Initialize a Git repository in your project directory:
git init
- Create a new file called LICENSE in your project directory, and copy the text of the desired License into this file. You can find the License text on internet. ( Optional Step. )
nano LICENSE
Paste the text inside and save it by pressing Ctrl+x >>> then y >>> then Enter.
-
Add all your project files to the Git repository:
- For adding all files at once use.
git add .
- For adding one file at a time use.
git add <file_name>
- For adding all files at once use.
-
Commit your files to the repository:
git commit -m "Your Commit"
-
Create a new repository on GitHub. Make sure to not initialize it with a README, .gitignore, or License. This is because you are pushing an existing repository.
-
Link the local repository to the remote repository:
git remote add origin https://github.com/username/new-repo.git
Replace https://github.com/username/new-repo.git with the URL of your newly created GitHub repository.
- Rename your current branch to master:
git branch -m main master
- Push your local repository to GitHub:
git push -u origin master