🟡 git init
Creates a new local Git repository in your project directory. It sets up all the internal .git files needed to start tracking versions of your code.

Image description

🟡 git add
Adds specified file(s) to the staging area, telling Git you want to include them in the next commit. Example: git add filename.txt or git add . to stage everything.

Image description

🟡 git commit
Takes the staged files and permanently records their current state in the repository's history. You must provide a message:
Example: git commit -m "Add new feature"

Image description

🟡 git status
Displays the state of your working directory and staging area — shows which files are modified, staged, or untracked.

Image description

🟡 git log
Shows a list of all the commits made in the repository along with their hash IDs, authors, and commit messages.

Image description

🟡 git branch
Shows all local branches in your repo. The * indicates the current branch. You can also use it to create a new branch:
Example: git branch feature-1

Image description

🟡 git branch -M main
Renames your current branch (often master) to main. The -M flag forces the rename if the target name already exists.

Image description

🟡 git config --global user.name
Sets your name and email address globally so Git can attribute commits to you.

Image description

🟡 git config --global user.email
Sets your name and email address globally so Git can attribute commits to you.

Image description

🟡 git push
Sends your commits to a remote repository (like GitHub). Use -u for the first push to link your local branch with the remote one:user.email
Sets your name and email address globally so Git can attribute commits to you.

Image description