My Two-Week Journey into Git and GitHub,From Local Projects to Version Control

My Two-Week Journey into Git and GitHub,From Local Projects to Version ControlCLEOPAS RONO

Introduction Over the past two weeks,I have been learning the basics of Git and GitHub and...

Introduction

Over the past two weeks,I have been learning the basics of Git and GitHub and how they are used in software development.During the classes, I learned that Git and GitHub are not the same thing. Git is a version control system that runs on my computer and helps me track changes in my project, while GitHub is an online platform where I can store and manage Git repositories and collaborate with other developers.
One of the most useful things I learned was how to take a project that is stored in a local folder on my computer and connect it to GitHub. I also learned how SSH can be used to securely connect my computer to GitHub.

Understanding Git

One of the first things I learned was that Git helps me keep track of changes in my files. Instead of manually keeping different copies of a project whenever I make changes, Git allows me to record those changes and go back to previous versions when necessary.
For example, if I create a project and later make changes that cause something to stop working, Git allows me to see what changed and restore an earlier version of the project.
Git works mainly through the command line, where I use commands to tell Git what I want it to do.
One of the first commands I learned was:

1. git --version

This allows me to check whether Git is installed on my computer and see the version that is currently installed.

2. git init

This creates a Git repository in my project. It means Git can now start tracking the files and changes inside that folder.
I also learned that Git does not automatically save every change as a version. I have to tell Git which changes I want to include and then create a commit.

3. git status

This command is useful because it shows me which files have been changed, which files are untracked, and which files are ready to be committed.

Connecting My Local Project to GitHub

After learning how Git works locally, I learned how to connect my local repository to a repository on GitHub.
First, I need to create a repository on GitHub. Once the repository is created, GitHub provides a remote repository that I can connect to my local project.
I can connect the local repository using:
git remote add origin git@github.com:USERNAME/REPOSITORY.git
I can check whether the remote connection has been added correctly by using: git remote -v This shows me the remote repository that my local Git repository is connected to.

Understanding SSH

I also learn on how to create the SSH keys and know that SSH keys can be used to authenticate my computer.With that i can used this command :
ssh-keygen -t ed25519 -C "myemail@example.com"
This creates a pair of keys: a private key and a public key. After adding the public SSH key to GitHub, I can test the connection using:
ssh -T git@github.com

Pushing My Project to GitHub

After connecting my local repository to GitHub, the next step was to send my commits from my computer to the GitHub repository.
I learned that this is done using the git push command.

Conclusion

My two weeks of learning Git and GitHub gave me a better understanding of one of the basic tools used in modern software development. I learned how to create a Git repository, track changes, stage files, create commits, connect a local project to GitHub, configure SSH, and push my work to a remote repository.
The most important thing for me was not just memorizing commands but understanding the workflow behind them. I can now see how a project moves from being a simple folder on my computer to becoming a properly tracked project on GitHub.
This experience has given me a foundation that I can continue building on as I learn more about software development, collaboration, and version control.
Here is a summary of everything i learn in my first two weeks at LuxdevHq:

TWO WEEKS SUMMARY IMAGE