GitHub Commands

Git Commands Summary git init – Initializes a new Git repo in the current folder. git add . – Stages all files for commit. git commit -m "..." – Commits changes with a message. git remote add origin – Links your local repo to GitHub. git branch -M main – Renames the current branch to main. git push -u origin main – Pushes your code to GitHub and sets upstream. git status – Shows current branch and file status (everything up to date). git log – Shows commit history. git config – Sets global username and email. git add . – Stages changes. git commit -m "Changes made" – Commits with message. git push -u origin main – Pushes to GitHub and sets upstream.

Apr 24, 2025 - 05:03
 0
GitHub Commands

Git Commands Summary
git init – Initializes a new Git repo in the current folder.

git add . – Stages all files for commit.

git commit -m "..." – Commits changes with a message.

git remote add origin – Links your local repo to GitHub.

git branch -M main – Renames the current branch to main.

git push -u origin main – Pushes your code to GitHub and sets upstream.

git status – Shows current branch and file status (everything up to date).

Image1

git log – Shows commit history.

git config – Sets global username and email.

git add . – Stages changes.

git commit -m "Changes made" – Commits with message.

git push -u origin main – Pushes to GitHub and sets upstream.

Image2