From Local Folder to Github: Setting Up my First Project With Git and Github: A Guide
Introduction Managing files locally or manually in your own pc gets out of hand very fast. You might find that you have a file named project_final_1 and project_final_2 which are about the same project but named differently depending on the day the projects were updated or modified. Git Bash is a command line tool that records detailed history of your code as it changes over time GitHub is an online tool where the changes in your code are stored remotely. GitHub does not use folders instead it uses repositories. The repositories make it easier for you to store your work, have a back-up of your work and also showcase your portfolio. Step 1:Installing Git First you have to install git depending on your operating system. Once installed open git bash and you have to tell Git who you are. The code below will help you set up git for the very first time git config --global user.name "put your name here" git config --global user.email "put your email here" After configuration you have to verify your installation with the code below git --version Adding SSH Key For your git to be connected to git hub you have to genarate an ssh key. The key allows your git to access your github without much stress. First you open your terminal or git bash terminal and run the code below to generate the SSH key. ssh-keygen -t ed25519 -C "enter your email here" This code will prompt you on your terminal to save the key on its default location, press enter. Next you will be prompted to enter a passphrase, for easy access and to elimate the chances of forgetting the passphrase you entered just press enter twice. Now you have a public key saved in your pc, use the command below to copy the key. cat ~/.ssh/id_ed25519.pub Adding the Key to GitHub Login into github, click on your profile picture in the top left corner and select settings . in the left navigation bar click SSH and GPG keys . Click the New SSH key button. Give a description of your key (eg .my work laptop), in the drop down menu make