DEV Community

Cover image for AltSchool Of Engineering Tinyuka’24 Month 7 Week 2
Ikoh Sylva
Ikoh Sylva

Posted on

AltSchool Of Engineering Tinyuka’24 Month 7 Week 2

We started the class with a revision of the previous class as usual with, Linux Process Management, Linux File System, Virtual Storage and so on... You can go through the previous class here for more context this is what our instructor taught us this week. Let’s get to it!

Image of a plane

A Deep Dive into Version Control with Git

In modern software development, collaboration, speed, and efficiency are paramount. Whether you’re working solo on a personal project or as part of a distributed team across multiple time zones, the ability to track, manage, and collaborate on code is essential. That’s where Git, the world’s most widely used version control system, comes in.

What is Version Control?

Version Control Systems (VCS) are tools that record changes to files over time so you can recall specific versions later. Instead of emailing “final_v3_really_final.py” to teammates, a VCS keeps a clean, organized history of your project.

Why Version Control Matters

  • Collaboration: Multiple developers can work on the same project simultaneously.

  • History Tracking: Roll back to previous versions if something breaks.

  • Branching: Experiment on new features without disrupting main code.

  • Recovery: Protects work in case of accidental deletions or overwrites.

Example: Imagine three developers building a finance app. One works on user authentication, another on the dashboard, and the third on payment integration. Without version control, changes might overwrite each other. With Git, each developer works in a separate branch, merges cleanly, and the full history is preserved.

Git as a Distributed Version Control System

Unlike centralized systems (like SVN), Git is distributed. This means every developer has a full copy of the repository, including its history, on their local machine.

  • Centralized VCS: Requires constant access to a central server.

  • Distributed VCS (Git): Developers can work offline, commit locally, and push changes later.

Example: You’re coding on a plane without Wi-Fi. With Git, you can still commit changes locally. Once you’re back online, you push those commits to GitHub or GitLab.

Image of a plane

Essential Git Commands

Git’s power lies in its commands. Here are some essentials:

  • Initialize a Repo:

git init

Creates a new local repository.

  • Clone a Repo:

git clone https://github.com/user/project.git

Downloads an existing repo.

  • Check Status:

git status

Shows changes and branch info.

  • Stage Changes:

git add file.py

Prepares changes for commit.

  • Commit Changes:

git commit -m "Added login feature"

Saves a snapshot of staged changes.

  • Push to Remote:

git push origin main

Uploads local commits to the remote repository.

  • Pull Updates:

git pull origin main

Fetches and merges changes from remote.

Git Workflow

A workflow defines how developers use Git in practice. Common workflows include:

1. Centralized Workflow
Everyone pushes directly to the main branch. Simple but risky.

2. Feature Branch Workflow
Each feature gets its own branch, merged into main after review.
git checkout -b feature/login

3. Gitflow Workflow
Uses multiple branches:

  • main → production-ready code

  • develop → active development

  • Feature, release, and hotfix branches for structured releases.

4. Forking Workflow
Popular in open-source. Contributors fork a repo, make changes, then submit pull requests.

Example: On GitHub, when contributing to an open-source project, you fork the repo, create a branch for your fix, and open a pull request to the original repo.

Key Git Terms

  • Repository (Repo): A project tracked by Git.

  • Commit: A saved snapshot of changes.

  • Branch: A pointer to a line of development.

  • Merge: Combining two branches.

  • Remote: A shared repository (GitHub, GitLab, Bitbucket).

  • HEAD: The current snapshot/branch pointer.

  • Pull Request (PR) / Merge Request (MR): A way to propose merging changes.

Image of a plane

Git is not just a tool, it’s the backbone of modern development. By mastering commands, workflows, and core concepts, you’ll be able to collaborate seamlessly, maintain project history, and contribute effectively to teams and open-source communities.

Whether you’re a junior developer learning Git for the first time or a senior engineer managing large-scale systems, Git is a skill you’ll rely on daily. Also do well to explore these concepts further to enable you better understand and don’t hesitate to reach out if in need of support.

I am Ikoh Sylva a Cloud Computing Enthusiast with few months hands on experience on AWS. I’m currently documenting my Cloud journey here from a beginner’s perspective. If this sounds good to you kindly like and follow, also consider recommending this article to others who you think might also be starting out their cloud journies to enable us learn and grow together.

You can also consider following me on social media below;

LinkedIn Facebook X

Top comments (0)