My First GitHub Project: From a Local Folder to GitHub Using Git & SSH
Introduction It is important to note that Git and GitHub are not the same thing and have different purposes. Git is a version control system that runs on my PC and helps track changes to files. GitHub on the other hand is an online platform where Git repositories can be stored , shared , and collaborated on . A Git repository is a storage space in a PC that contains project’s files along with the…
Git and GitHub serve different purposes; Git is a version control system that runs on a computer and helps track changes to files, while GitHub is an online platform for storing, sharing, and collaborating on Git repositories. A Git repository is a storage space on a computer that contains a project's files and their entire history of changes.
To manage a project locally, Git is used, and for remote storage and access, GitHub is required. Connecting a Git repository to GitHub requires a cryptographic network protocol called SSH, which allows secure remote access, command execution, and file transfers over unsecured networks.
To create a project in a local folder and connect it to GitHub, follow these steps:
1. Check the current location by running the command pwd, which returned "/c/Users/ezraw/OneDrive/Desktop". This confirms the working directory.
2. Move to the Desktop by running cd OneDrive/.
3. Verify the location by running pwd again, which returned "/c/Users/ezraw/OneDrive/Desktop".
4. Create a new folder named "kenyan-hospital-health-records" using the command mkdir kenyan-hospital-health-records.
5. Access the newly created folder by running cd kenyan-hospital-health-records.
6. Confirm the file path by running pwd, which returned "/c/Users/ezraw/OneDrive/Desktop/kenyan-hospital-health-records".
7. Create sub-folders for the project structure by running mkdir data, mkdir notebooks, and mkdir scripts.
8. Add a README.md file for project description using touch README.md.
9. Add the existing dataset Excel file to the project by copying it to the project folder using cp ~/Downloads/Kenyan_Hospital_Health_Records.xlsx.
10. Move the Excel file to the data sub-folder using mv Kenyan_Hospital_Health_Records.xlsx data/.
11. Inspect the project structure by running ls, which returned:
- README.md
- data/
- Kenyan_Hospital_Health_Records.xlsx
- notebooks/
- scripts/
12. Add content to the README.md file by running echo "# Kenyan Hospital Health Records Analysis" > README.md and then adding more information using markdown syntax.
13. Review the contents of the README.md file by running cat README.md.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.