Introduction
People, especially beginners, face challenges when making changes to their projects and pushing those changes to Github. Some of the challenges faced include Git command, authentification, configuration etc.
This article aims to explain the process of building a Github project, from creating local directories/folders to uploading the project to Github using Git and secure shell(ssh).
I will use a project titled Poor Performance in 2025 National Exams as a case example to illustrate the steps involved in creating a project.
The process is outlined in the following steps:
STEP 1: Creating directories
The first step of a project is to establish a well organized directory structure. This helps keep project files organized logically, making them easier to manage, access and maintain throughout the development process.
We create our project directories within Desktop and OneDrive.
Desktop is basically a special directory used by windows to store files and shortcuts while OneDrive is a microsoft's storage store.
In our case we start by navigating to the desktop directory using Git.
For example, cd desktop means 'go to desktop'
Next, Use ls to list all the directories and files in desktop.
Once you have navigated the desktop directory, Proceed to making your first project directory.
We use mkdir commandto create a new directory.
For example,
mkdir "Poor-performance-in-2025-National Exam"
.
Next, we create additional directories within our newly created project directory. In this case we will create a directory called Data, which will store the datasets required for the analysis.
For example,
mkdir data
STEP 2: Creating Files
Files are essential part of building a project. In this step, we will create a README.md file.
A README.md gives an overview of the project and describes its purpose, structure and usage in a clear and understandable way. README.md is written using Markdown language.
we use touch to create files.
For example,
touch README.md
STEP 3: Printing on README.md
we use echo or nanoto add content on README.md file and to describe our project.
In our case example, we will add project title and an overview.
*Using echo
echo "# Poor Performance in 2025 National Exam" > README.md
echo "# Project Overview" >> README.md
The > operator overwrites the file, while >> adds content to the existing file without deleting what is already there.
*using nano README.md
# Poor performance in 2025 National Exams
## Project Overview
This project aims to identify key factors that led to poor academic performance in 2025.
## Tools Used
-Excel
-Power Bi
-Python
## Challenges Faced
-Missing Data
-Outliers
-Duplicates
-Data Accessibility
-Unstructured data
STEP 4: Commit the project
A commit is a saved checkpoint in the history of repository. It records all the changes that have been made at a particular point in time.
First, we stage all eligible changes.
Using:
git commit add.
Once the changes have been staged,we save them as a commit and give a commit message.
git commit -m " Add Poor performance in 2025 National Exam Analysis"
The -m in our command allows us to provide a message describing the changes included in the commit.
To view the history of commits in our repository we use:
git log
or to show our commit in a short format
git log --oneline
STEP 5: Checking and Connecting Git to Github
Github is an online platform where Git repositories can be stored and shared.
To securely connect Git to Github, we need to usea Secure shell(ssh). SSH is typically a protocal used to create secure connection between Git and Github.
To check whether ssh keys already exists before generating one use:
ls -al ~/.ssh
If a SSH key does not already exist, Generate ed25519 ssh key from the Git using:
ssh-keygen -t ed25519 -C "tonnymuthuri6@gmail.com"
Git generates two keys:
-public key
-private key
Copy the public one.
cat ~/.ssh/id_ed25519.pub
Add the copied ssh to your Github (Setings > ssh and gpg keys).
Fill in the ssh key form:
Title- give the key a descriptive name
Key type- choose authentication key
Key- paste the copied public ssh key here
Then click add ssh key.
To test the ssh connection you need to return to GitBash and run:
ssh-T git@github.com
STEP 6: Connecting Git repository to a remote repository
Open the Github and create a new repository. Once the repository has been created, copy the ssh.
We can then connect our local repository to a remote repository using this command:
git remote add origin "paste the ssh here"
To check the remote repositories connected to our local Git repository we use this command:
git remote -v
The final stepis to push (sending changes from Git to Github)
git push -u origin main
The command uploads the created commits from our local main branch to the Github repository called Origin
The final step is to refresh your github.
Top comments (0)