Basic Git commands
Qadir Hassan
Junior Front-End Developer @ Genetech Solution | Front-End-Development Trainer @ Consulnet Corporation | Trained 100+ Girls in Front-End Development | Learning Python as a side hustle
git status
The first and most commonly used Git command is git status.
git status displays the state of the working tree (and of the staging area). It lets you see which changes are currently being tracked by Git, so you can decide whether you want to ask Git to take another snapshot.
git add
git add is the command you use to tell Git to start keeping track of changes in certain files.
The technical term is staging these changes. You'll use git add to stage changes to prepare for a commit. All changes in files that have been added but not yet committed are stored in the staging area.
git commit
After you've staged some changes for commit, you can save your work to a snapshot by invoking the git commit command.