git init
creates a .git
folder that stores the entire project history on your computer, enabling offline version control.
git clone
gives every user a complete copy of the repository, allowing collaboration through git push
and git pull
with remote repositories.
git status
β Check which files are modified.
git add <file>
β Move files from the working directory to the staging area.
git commit -m "message"
β Moves files from the staging area to the local repository.
git push origin <branch>
β Pushes committed changes to the remote repository.
git pull origin <branch>
β Fetches and merges the latest changes from the remote repository.
git checkout
β It moves changes from the repository back to the working directory.
git pull
β It fetches and updates your local repository with changes from the remote repository.
Your feedback helps us grow! If there's anything we can fix or improve, please let us know.
Weβre here to make our tutorials better based on your thoughts and suggestions.