今日已更新 344 条资讯 | 累计 37249 条内容
关于我们

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

Gabriel Wainaina 2026年08月23日 14:37 10 次阅读 来源:Dev.to

Introduction The following is a step-by-step process of how i was able create my first GitHub project from a local folder and upload it to Github using Git and SSH. Creating a local folder using git. Using Gitbash, I wanted to see the list of files and directories on my pc. I used the command function ls which enabled me to see them. Since I wanted to create a folder in Desktop under OneDrive, I used firstly cd OneDrive which allowed me to access OneDrive then used cd Desktop allowing me to access Desktop. Basically the command function cd (change of directory) allows one to access a directory that is required while Using cd .. allows one to go to the previous directory. Using mkdir Kenya-Hospital-Health-Records-Project I was able to create a folder under the name Kenya-Hospital-Health-Records-Project. We can use hyphens, underscores and quotes in names that contain more than one word because inclusion of spaces will create separate folders instead of the required one folder. Using cd Kenya-Hospital-Health-Records-Project to access our folder, I created another folder inside it called data using mkdir data . Creating a README file I created Readme file using touch README.md where .md denotes mean Markdown. A Readme file would be able to explain the context of our project on Github and to do this we use the command function echo to print text. I used echo "# KENYA HEALTH RECORDS ANALYSIS" > README.md to indicate title of the README file and using # to indicate it is as the main title. Using echo "## Project Overview" >> README.md I was able to mark it as a sub heading. using > instead of >> would have simply replaced our Tittle an used the subtitle as the main tittle hence I used >> to simply add and not replace. To see the contents we have written so far we use cat README.md . I also incorporated nano README.md to edit some parts where i saw fit to edit. Initializing git Then I used git init which is used to treat the folder as a git repository creating a hidden fol

本文内容来源于互联网,版权归原作者所有
查看原文