My First GitHub Project.
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).…
Embarking on a GitHub project can be daunting for newcomers, particularly when grappling with Git commands, authentication, and configuration. This article aims to demystify the process by walking through the creation of a GitHub project from scratch, using the case study of "Poor Performance in 2025 National Exams."
To begin, one must establish a well-organized directory structure. This organization aids in managing, accessing, and maintaining project files throughout the development process. The project directories are created within the Desktop and OneDrive directories. Starting with the Desktop directory, navigate to it using the command `cd desktop`. Upon listing the directories and files with `ls`, the first project directory, "Poor Performance in 2025 National Exam," is created using the `mkdir` command.
Within this project directory, additional directories are created to store necessary datasets. For instance, a directory named "Data" is created to house the required datasets. Once the directories are set up, the next step involves creating files that provide an overview of the project. A README.md file, written in Markdown language, is created using the `touch` command.
The content of the README.md file is then added using either the `echo` or `nano` commands. In this case, the project title and an overview are included. The `echo` command overwrites the file, while the `nano` command allows for appending content without deleting existing information.
After populating the README.md file, the project is committed to the repository. A commit serves as a checkpoint in the repository's history, documenting all changes made at a specific point in time. The changes are staged using `git commit add`, and then a commit message is provided using `git commit -m "Add Poor performance in 2025 National Exam Analysis"`.
To view the history of commits, the `git log` command is used, either in its default format or in a short format with `git log --oneline`. With the project locally committed, the next step is to connect Git to GitHub. This is achieved by checking for existing SSH keys with `ls -al ~/.ssh`. If no keys exist, a new SSH key is generated using `ssh-keygen -t ed25519 -C "tonnymuthuri6@gmail.com"`.
The public key is then copied and added to GitHub under the "SSH and GPG keys" section. The copied public key is added to GitHub, and a test connection to GitHub is verified by running `ssh -T git@github.com` in GitBash.
Once the SSH connection is confirmed, the local Git repository is connected to a remote repository on GitHub. This is done by creating a new repository on GitHub and copying the SSH link. The local repository is then linked to the remote repository using the command `git remote add origin <paste SSH here>`. To confirm the connection, the command `git remote -v` is executed.
The final step is to push the changes from the local main branch to the GitHub repository with the command `git push -u origin main`. This uploads the committed changes to the GitHub repository, completing the process.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.