Skip to content

jsdingra11/basic-git-guide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Git Guide

This repository provides a simple walkthrough of Git — from installation to pushing your first repository to GitHub.

📥 Installation

Windows

  1. Download Git from git-scm.com.
  2. Run the installer with default options.
  3. Open Git Bash to verify:
    git --version

macOS

brew install git

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install git

🛠️ Initial Setup

Set your Git identity:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

📁 Create a New Git Repository

mkdir my-project
cd my-project
git init

➕ Add and Commit Files

git add .
git commit -m "Initial commit"

🌐 Connect to GitHub

  1. Create a new repo on GitHub (without a README).
  2. Add remote and push:
git remote add origin https://github.com/your-username/your-repo.git
git branch -M main
git push -u origin main

✅ Done!

Your code is now live on GitHub!


#### 📄 `.gitignore`
```gitignore
# Ignore node_modules, compiled files, OS-generated files, etc.

node_modules/
*.log
.DS_Store
*.pyc
.env
```

About

A Short Guide to Understand the Working of Git and Github

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 69.0%
  • CSS 31.0%