Skip to main content

My First GitHub Project: From Local Folder to Git & SSH

Learn how to upload the Kenya-Hospitals-Records-Analysis project from a local machine to GitHub using Git Bash and SSH keys.

AI-written
Inewgen
23 Aug 2026Source: Dev.to2 min read (0 views)
Share
My First GitHub Project: From Local Folder to Git & SSH

Stock photo for illustration only, not from the actual event

Font size
  • Understand essential developer tools: Git, GitHub, Git Bash, and SSH Key
  • Create project directories and files for Kenya-Hospitals-Records-Analysis
  • Execute Git commands from local repository initialization to final push

Moving a project from a local computer to an online platform like GitHub is a crucial milestone for developers. By working on a project titled Kenya-Hospitals-Records-Analysis, the workflow becomes much clearer when breaking down the fundamental tools: Git tracks local changes, GitHub hosts online repositories, SSH Key secures connection credentials, and Git Bash acts as the command interface.

The process began by creating the main project directory using the command mkdir Kenya-Hospitals-Records-Analysis, followed by navigating into it with the cd command. Inside the directory, a Data folder and a README.md documentation file were created using mkdir Data and touch README.md respectively, and verified using the ls command.

terminal command line interface programming screen

Stock photo for illustration only, not from the actual event

Once the local file structure was ready, Git was initialized using git init. The author then checked untracked files with git status, staged them using git add ., and saved the initial checkpoint with git commit -m "First commit" to document the very first version of the codebase.

Using an SSH key instead of a password is an industry best practice for version control. It eliminates the friction of repeated authentication prompts while safeguarding the communication tunnel between your local workstation and remote repositories on GitHub.

The final phase involved verifying the working branch as main, linking the local repository to GitHub via git remote add origin with the SSH URL, confirming the link using git remote -v, and finally pushing all committed changes using git push -u origin main. Opening the GitHub repository confirmed that both the Data folder and README.md file were successfully uploaded.

Source: Dev.to

Comments

Leave a Comment
0/2000

Found something wrong in this article? Report an issue with this article