Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 1.03 KB

File metadata and controls

79 lines (54 loc) · 1.03 KB

🚀 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