Introduction I am on week two of learning Data Science and Analytics and I have just been introduced to Git and Github. Basing by the name I could tell that they are somehow connected. I got started by learning about configuring git through bash and creating a github account. Then creating folders using Git Bash, moving backward while on bash terminal, renaming on bash terminal, deleting, staging to eventually pushing a folder from local folder to github using Git bash and also pushing a local folder to Github using VS Code studio. Steps Taken During Git Bash Set-up and Configuration to the eventual pushing of the folder to Github. Downloading and Installing Git Running git --version to ensure it installed correctly Then the Git Bash configuration where you run git config --global user.name "Your Name" to set your name and then git config --global user.email "Your Email" to set your email. It is usually recommended to use the actual email that is linked to your Github account. Then run git config --global user.name and git config --global user.email to confirm that the values actually went through. Then run git config --global --list to show what you have configure so far, also it will show the branch you are on. The sixth step is setting up the SSH key which will be used to access my github since I intend to connect with my Github using SSH instead of HTTPS. Setting the SSH is by using ssh-keygen -t ed25519 -C "your email" this is one of the crucial codes to remember about Bash. Then press enter to save on the default folder, then set passphrase (It will be blank as you do this, don't panic) if an existing key exists, you will be asked to overwrite or not. After setting the passphrase, it will be saved in the default folder, type in cat ~/.ssh/id_ed25519.pub to get the SSH key which we shall link to Github. Open up Github account, login/create a new one, navigate to profile icon, then settings, then click on SSH and GPG keys, then select New SSH key and paste the key from Git Bash and our Git Bash and Github are now linked and we can push straight from Bash to Github repo. The project I was working on was on Hospital Health Data Analysis. I had the .xlsx file ready but in my downloads folder. I could not move it in the convectional manner through files explorer but through Git Bash. Back to Bash, I typed pwd this is the command for printing the working directory so that you know from which folder you are working in. Creating of the Project Folder and README.md File To create the Projector folder in which I was to work from and eventually push to Github, I used cd Onedrive to move to Onedrive, this way I could backup my work always, then mkdir Project001 to make directory, after I used ls command to see what folders and files were in my folder. cd stands for change directory which you can loosely translate as moving into another folder from the current one. mkdir is the bash command for creating a folder and ls is the command for listing, which is used to get a list of the all the content in a folder. Once the project was created, I created another folder for data through mkdir data while I was in the project folder, then I had to create a README.md file which had the notes and about of the project detailed what the project was about, the tools used, challenges faced etc. To create the README.md file I used touch README.md Moving/Copying the .xlsx File from Download to the Project Folder Once the project folder was ready, I had to copy the file from downloads folder to the project folder I had just created using Bash. This, I achieved by using the bash command cp ~/Downloads/name of the .lsx file ~/Onedrive/Project001/data/ cp means copy and mv means move, you can use either cp or move. Then I used command ls to confirm all was in order in the Project and data folder. Editing the README.md First off, the .md stands for markdown language. We have already created the README.md by using Bash command touch README.md . To write on the README.md we use command echo "all about your project" > README.md a couple of things to know here is that echo is the command to print/write, then the > points to where the writing is to be done. The use of one > means overwrite what was already existing, so to add onto what is existing on the README.md we use double >> Then to create a space so as to write the next paragraph, I used command echo "" > README.md this command creates a space or line jump. I used cat README.md to show what was in the README.md file. To edit the README.md file comfortable and easily, I used the Bash command nano README.md which opens a new tab to allow you to edit the README.md like you would a txt or MS word file. Also, when correcting a README.md file, I used mv README.md REEDME.md this works to rename a file or folder, then command cd .. works to go back one step from the current folder. Preparing the Folder for Pushing to Github. Now that we have our project folder all working and the files in place, we are ready to stage our folder for push to Github. Run pwd to ensure you are in the right folder. Then cd to the right folder. Run ls command to ensure all files and folders are in place. Next, we initialize git in the project folder by using bash command git init . Then we stage everything in the project folder by using git add . command. Next, we confirm if the staging worked by using command git status Here we commit the message by using git command git commit -m "the message" We confirm which Git branch we are in by running git branch Here we link our Github with the Bash by using command git remote add origin 'the ssh link copied from github from the repository created Then command git remote -v Here we now push our project folder. This is done using command git push -u origin main Once this is done and all was done correctly, the folder will be pushed to Github, if any error is faced, ensure the project folder had data in it and that you configured git bash and linked to Github Correctly. Conclusion This is week two of Data Science and Analytics, I have a basic and solid understanding of Git Bash, I intend to push more on practice so that I can have this in my fingertips. I am excited of my journey, this is the beginning and I can't wait to delve deep all the way in the world of data. Next, I will be talking about pushing local folder to Github using VS Code which is faster and somehow easier, but we do not do it easy, do we? Learn more

# My First Github Project: From a Local Folder to Github Using Git and SSH
Nesta Munene

