βπβπ
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 which I then pushed to a live repository on GitHub using the command line.
I was working with a "Kenya_Hospital_Health_Records" csv dataset which was to be stored in a sub-folder called "data" within the main folder on the desktop which is named after the file.
These are the steps I tookπ:
1. Local Project Set Up
Open the bash terminal and navigate to the desktop using the cd command and create the main folder along with the sub-folder.
cd Desktop
mkdir -p Kenya_Hospital_Health_Records_Project/Data
cd Kenya_Hospital_Health_Records_Project
Copy and paste the file into the sub-folder.
Creating the README.md File
echo "# KENYA HEALTH RECORDS ANALYSIS" > README.md
echo "##Project Overview" >> README.md
echo "This is a project analysis for a hospital health records" >> README.md
cat README.md
-
>operator adds new text to the file. -
>>operator adds text to already written text. -
cat README.mdprints the contents of the file for review. -
nano README.mdedits the file.
2. Creating a Tracked Git Repository
git init creates and empty repository.
git status checks the status of the repository.
git add . adds everything to the current repository.
git commit -m "Kenya Hospital Records Project the commit message helps to remember whatever it entails.
git remote add origin https://github.com/prudencejeronokorir-code/Git-Commands-Class.git this is the SSH key that links the local repository to the empty GitHub repository.
ssh -T git@github.com to confirm that the SSH key works
git push -u origin main pushes the local main branch to the remote origin on GitHub
*-u command helps avoid typing out the branch name upon every update.
And with that you are done!!!
πππ
Top comments (0)