Git is a free, open-source version control system designed to handle everything from small to very large projects with speed and efficiency. It tracks changes in source code, allowing multiple developers to collaborate efficiently.
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Git is the most popular system used today.
Hereβs the basic flow youβll use often when working with Git:
git init # Create a new Git repository git status # Check status of files git add filename # Stage a specific file git add . # Stage all changes git commit -m "msg" # Commit with message git log # View commit history git push origin main # Push code to remote repository
index.html
: git add index.html
git commit -m "Updated index page"
git push origin main
GitHub is a cloud platform for hosting your Git repositories. After creating a repository on GitHub, you can connect it to your local repo using:
git remote add origin https://github.com/username/repo-name.git git push -u origin main
init
, add
, commit
, and push
are your best friends.Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!