Skip to main content

Command Palette

Search for a command to run...

GIT For Beginners

Published
•2 min read•View as Markdown

1.WHAT IS GIT?

Git is a distributed version control system that helps developers track changes in their code over time and every other person knows the exact changes made by the other member of the same project. Which reduces confusion,saves time,less errors and progressive working. Simply put, Git keeps a history of your work so you can go back to earlier versions, collaborate with others, and avoid losing progress when mistakes happen.

2.WHY IS GIT USED?

Git used because it makes teamwork easier. Multiple developers can work on the same project without overwriting each other’s code. If something breaks, Git allows you to quickly identify what changed and fix it.

3.Git Basics and Core Terminologies

Some core Git terminologies include a repository (where your project lives), a commit (basically a saved snapshot of changes), a branch (an independent line of development which points to head after that work is done), and HEAD (the current position in the project).

4.Common Git Commands

Common Git commands include git init to start a repository(with this command you can start saving changes of the program), git status to check changes(shows all the changes or commit with their unique ID's), git add to stage files(moves the file into staging area), git commit to save changes, and git log to view history. A typical workflow moves code from the working directory to the staging area, and finally into the repository