Git: Git is a version control system
- Stages:
- Working directory
- Staging area
- Local repo
![]()
- Create a local repo
git init
-
The default branch is master/main
-
Move files from the working directory to the staging area
git add <file path>
- Add all changed files and folders to the staging area
git add .
- Commit files from staging to the local repo
git commit -m "first commit"
- Check the status of the working directory and staging area
git status
- Check the local repo log and commit IDs
git log
Git global configuration:
- Username
git config --global user.name "admin"
git config --global user.email admin@qt.com
