Urgent.News

What's breaking now, across thousands of outlets.

Tech

My First GitHub Project: From a Local Folder to GitHub Using Git and SSH

โญ๐Ÿš€โญ๐Ÿš€ When I first walked through the gates of LuxDevHq, my first thought was "endless possibilities". However, I was intimidated. I did not think I would measure up. But when I attended my first class, I learned that building something great starts with a great foundation and at LuxDevHq, that means mastering all the basics. In the last week, I worked on setting up a local project on my desktopโ€ฆ

My first GitHub project journey began with a sense of excitement and a touch of intimidation when I arrived at LuxDevHq. Despite not feeling confident in my abilities, I learned at my first class that building something remarkable begins with a strong foundation, and mastering the basics is essential. This week, I focused on setting up a local project on my desktop and then pushed it to a live GitHub repository using the command line.

The dataset I worked with was a Kenya_Hospital_Health_Records CSV file, which would be stored in a sub-folder called Data within a main folder named after the file on my desktop. Here are the steps I followed:

1. Local Project Setup: I opened my bash terminal, navigated to my desktop using the cd command, and created both the main folder and the sub-folder. I copied the file into the sub-folder. To create a README.md file containing the project overview, I used echo commands to add headers and text. Finally, I used the cat command to review the contents of the file and nano to edit it.

2. Creating a Tracked Git Repository: I initiated an empty Git repository with git init, checked the repository status with git status, added everything to the current repository with git add ., committed the changes with a message using git commit -m, and linked the local repository to the empty GitHub repository using git remote add origin.

To confirm that my SSH key was working, I executed ssh -T git@github.com. Finally, I pushed the local main branch to the remote origin on GitHub using git push -u origin main, which eased the process of updating the repository in the future.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to โ†’

More in Tech

More from Sunday 23 August โ†’