Skip to content

About

A quick Git & GitHub command reference for initializing repositories, cloning projects, managing remotes, and pushing code efficiently.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🚀 GitHub Setup Guide

📌 Initialize Git Repository

git init
git add .
git commit -m "Initial Commit"
git branch -M main
git remote add origin https://github.com/USERNAME/REPOSITORY_NAME.git
git push -u origin main

🔄 Change Existing Remote Repository

Check Current Remote

git remote -v

Remove Old Repository

git remote remove origin

Add New Repository

git remote add origin https://github.com/NEW_USERNAME/REPO_NAME.git

Push Project to GitHub

git branch -M main
git push -u origin main

✅ Rename Branch to Main

If your branch is named master, rename it to main:

git branch -M main
git push -u origin main

📥 Clone Repository

git clone https://github.com/USERNAME/REPOSITORY_NAME.git
cd REPOSITORY_NAME

📤 Push Future Changes

git add .
git commit -m "Update project"
git push origin main

pull(sync project for changes)

git status
git pull origin main

About

A quick Git & GitHub command reference for initializing repositories, cloning projects, managing remotes, and pushing code efficiently.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors