Getting started with GitHub

Published: (January 17, 2026 at 02:57 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Setting up Git locally

  • Configure Git to connect to your remote account.
    • Linux/macOS: run the commands in a terminal.
    • Windows: use Git Bash after installation.
      Verify the configuration with:
git config --global --list
git config --global user.name "Name"
git config --global user.email "email-address"
  • Navigate to your local project directory and initialize Git:
git init
  • Create a README.md file (or any other file, e.g., users.py):
touch README.md

The README.md file describes the project and how to use it.

Pushing Code

  • After working on your project, add changes to the staging area:
git add .
  • Commit the changes with a concise message:
git commit -m "signup function"
  • Push the code to the remote repository:
git push -u origin main

Note: Without committing, changes remain only in the local repository. The first push may prompt for authentication; set up SSH keys or a Personal Access Token for HTTPS.

Pulling Updated Code from GitHub

  • Check the status of your repository to ensure no uncommitted changes:
git status
  • Pull the latest changes (equivalent to git fetch followed by a merge):
git pull
Back to Blog

Related posts

Read more »

Introduction to Gitbash and Github

Definitions - Git is a widely used, free, and open‑source system designed to handle projects of all sizes. It enables developers to track changes in code and f...

Introduction to Git and Github

Why version control is important - Every change is recorded - You can go back to older versions of your code - You can see who made a change and when - Multipl...