1. git init
Initializes a new Git repo in your current directory.

Image description

Explanation: This command turns the current folder into a Git-tracked project.

2. git add
Adds files to staging.
Example: git add .(adds all files)

Image description

Explanation: Staging is like prepping your files before committing.

3. git commit
Saves changes with a message.
Example: git commit -m "Initial commit"

Image description

Explanation: It's like hitting "Save" for your project history.

4. git status
Shows the current status of files.

Image description

Explanation: Tells you what’s been modified, staged, or untracked.
line.

5. git log
Shows commit history.

Image description

Explanation: Your project’s time machine.

6. git branch
Lists all branches.

Image description

Explanation: Also used to create branches: git branch feature-xyz

7. git branch -M
Renames your branch.
Example: git branch -M main

Image description

Explanation: Use it to switch from master to main (the new standard).

8. git config user.name
Sets your username.
Example: git config --global user.name "YourName"

Image description

Explanation: Git will tag commits with this name.

9. git config user.email
Sets your email.
Example: git config --global user.email "you@example.com"

Image description

Explanation: GitHub uses this to link commits to your account.

10. git remote add origin
Connects your repo to GitHub.
Example: git remote add origin https://github.com/yourusername/yourrepo.git

Image description

Explanation: This sets the destination where you push your code.

11. git push
Sends your commits to GitHub.
Example: git push -u origin main

Image description

Explanation: Think of it as uploading your progress online.

AHH! Finally!

Image description