Version control allows developers to track and manage changes to their codebase over time. Git is a distributed version control system that enables multiple developers to work on the same project simultaneously.
git init
— Initializes a new Git repository in the current directory.git clone
— Clones an existing repository from GitHub to your local machine.git status
— Shows the current status of your working directory.git add
— Stages files for commit.git commit
— Commits your staged changes.git push
— Pushes your local changes to the remote repository.
git init
git add .
git commit -m "Initial commit"
git push origin main
These commands will initialize your Git repository, add your changes, commit them with a message, and then push them to your GitHub repository.