top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Version Control Made Simple: Git & GitHub for New Coders

May 24, 2025
3 min read

Updated: May 26, 2025

  

Versioning:

  • Programming and version control can feel confusing and intimidating, but this guide aims to make them easier to understand. It starts by explaining the concept of versioning, which is essentially tracking and saving snapshots of file changes over time. This allows developers to review or roll back changes as needed.

Git:

  • Git is a popular version control system (VCS) that helps manage this process manually—unlike cloud sync tools like Google Drive or Dropbox that update automatically. With Git, developers intentionally decide when to save (or commit) changes and share them with others. So, It allows multiple developers to work on a project simultaneously.

  • Git was created by Linus Torvalds in 2005 for the development of the Linux kernel.

GitHub

  • A cloud platform built on Git, owned by Microsoft.

  • Hosts repositories (containers for your project files) and handles backups.

  • Offers tools like GitHuB Desktop.

  • Alternatives: GitLab, Bitbucket, or self-hosting (less common due to complexity).

 

Key features of GIT

  • Version Control System: Git keeps track of every change you make to your project files. You can go back to previous versions if any requirement arises.

  • Repositories: A Git repository (or repo) is like a project's central hub where everything related to your work is stored and managed. There are two main types:

    • Local Repository: This is a copy of the repository which is stored in your computer. You can work on your project and make changes here.

    • Remote Repository: This is stored on a server, like GitHub, where you and others can share and work on a project.

  • Commits: Every time you make changes and save them in Git, these are called commits. The repository keeps track of all the commits you have made.

  • Branches: A repository allows you to create Branches and work on new features and fixes. For example, you can have a "main" branch for stable code and a "feature" branch for new features you're developing.

  • Merging: Once you are done with the branches you have made, you can merge those branches into the main branch. This adds the changes you have made in the rest of the project.

  • Cloning: Cloning is a process of making a complete copy of a Git repository. It's like copying the entire project from a central location ( like a website) to your own computer.

Key Git Concepts

Term

Description

Repository

A project folder tracked by Git (local & remote)

Clone

Make a local copy of a remote repository

Add

Stage changes before saving

Commit

Save a version with a message

Push

Upload your changes to GitHub

Pull

Download latest changes from the cloud

Branch

A separate version of your code to develop features without affecting main

Merge

Combine branches or changes

GitHub Desktop:

A beginner-friendly visual tool for managing Git operations without using the command line.

Download and install the GitHub Desktop from https://desktop.github.com/download/

Using GitHub Desktop to:

  • Clone a repository.

  • Make and commit changes.

  • Push updates to GitHub.

  • Fetch/pull changes from others.


            Working with Repositories
  1. Cloning a Repository:

    • Use GitHub Desktop to copy a remote project to your machine

  2. Committing Changes:

    • Only the staged files (added) are saved in a commit

    • Each commit should have a clear, concise message (e.g., “Fixed login bug”)

  3. Pushing and Pulling:

    • Push: Upload your commits to GitHub

    • Pull: Download changes made by others

  4. Pushing and Pulling:

    • Push: Upload your commits to GitHub

    • Pull: Download changes made by others

  5. Branching & Merge Conflicts

a. Branching:

Use branches to experiment or build new features without affecting the main code.

  • Main branch = stable code

  • Feature branch = new login feature

b. Merge Conflicts:

Occur when two developers change the same file in different ways. Resolve by:

  1. Accepting one version

  2. Merging both manually

  3. Recommitting the resolved code


Steps to Setup Git and GitHub:

1. Install Git

2. Sign Up for GitHub


3. Create a New Repository

  1. Log in to GitHub.

  2. Click the + sign (top-right) → New repository.

  3. Fill in:

    • Repository name

    • Description (optional)

    • Choose Public or Private (Private is recommended for beginners)

  4. Optional selections:

    • Initialize with a README.md

    • Add .gitignore (select Python if uploading Python files)

    • Choose a license (e.g., GNU, MIT)

  5. Click Create repository.


4. Upload Files to the Repository

  1. Once the repo is created, click Add file → Upload files.

  2. Select the file(s) from your computer (e.g., a .py Python file).

  3. After uploading, scroll down and click Commit changes.








 
 

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page