DEV Community

Cover image for GITHUB PROJECT
Susan kiptoo
Susan kiptoo

Posted on

GITHUB PROJECT

Definitions

Github- is a cloud-based platform for hosting, managing, and collaborating on software projects.
Git- the tool that tracks your code changes on your project.

  • After installing your gitbash configure your gitbash by configuring your identity: git config --global user.name "Your Full Name" run git config --global user.email "your_email@example.com"run

-Set your default as main:
git config --global init.defaultBranch main
This tells Git to use main as the default initial branch for new repositories

  • To verify your configuration use: git config --global --list

Creating Local folders:

Creating these local folders help in tracking and organizing documents for each folder.
-The Data Folder- helps in organizing and storing data in xls or csv file in a place that is reachable .
-The notebook Folder- helps in storing data while if using python e.g: jupyta notebook
-The scripts folder- help is in storing any scripts data
-Ananlys.py- helps in storing python scripts
When creating these folders we use gitbash to create these folders and files
-README.md- describe ur project in detail but easy term for non technical people to understand

That entire project can be one Git repository.
Repository- is a project being tracked by Git.``

Creating folders and files.

Using Gitbash we use specific codes to create the folders and files:

  1. Identify first where your desktop is in your PC :
    cd ls
    This will list all the list in your pc
    cd onedrive
    cd desktop
    Here we have already identified where our desktop is located and where we are going to create the files and folders.

  2. Creating the main folder:
    cd my-first-github-project

  3. Creating other folders inside the main folder:
    mkdir data
    mkdir notebook

  4. Creating Files in the main folder:
    touch analysis.py
    touch README.md
    -Writing texts on README.md we can use echo, that is if it is a short text
    example:
    Heading
    echo "# Kenyan Hospital Health Records Analysis" > README.md

Subheading
`
echo "## Project Overview" >> README.md
echo "### Project Summary" >> README.md
`

When writing long texts , we run a code on gitbsh , which opens a window where we can write all long texts and just save it, which i easier that using "echo"
We will run below code:
nano README.md
which will open the window, after updating you record click:
"ctrl+O", to save the updated record then "ctrl+X" to log out of that window and back to gitbash to continue with your other work.

  1. Generating SSH Key When Generating a ssh key run the code that will gerenarate the ssh key, then copy and paste the code on your github this will link the gitbash and github such that when pushing and pulling the code they will be visible on gitbuh and bash

ssh-keygen -t ed25519 -C "your_email@example.com"
After successfully adding the SSH key it should be displayed as on the attached screenshot:

Back to your Gitbash run the following codes to ensure gitbash and github are linked as expected:

git init= it initializes git repository
git add = put documents in a folder ready to archive
git commit -m "First commit on Kenyan Hospital Health Records Analysis" = archive that version with a label

git push --u origin main = send the archived version to GitHub from the main branch

git pull origin main= Pulls from the updated Github to gitbash for your visibility when listing.

Top comments (0)