triz-docs/docs/git-operations/command-line/add-commit.md
Othmane Ataallah 6010b96146
All checks were successful
Deploy triz-docs to civital server / build-and-deploy (push) Successful in 1h8m30s
add git-operations-in-the-command-line
2026-04-29 09:46:33 +01:00

49 lines
794 B
Markdown

---
sidebar_position: 2
title: "Add & Commit Changes"
---
# Add & Commit Changes
---
# Add Changes
## Objective
Select modified files and place them into the staging area before committing.
## Steps
1. Modify one or more files in the project.
2. In the terminal, check the status of the repository: `git status`
![Git Status](img/2.png)
3. Add files to the staging area: `git add .`
![Git Add](img/3.png)
4. Verify that files are staged: `git status`
![Git Status Staged](img/4.png)
---
# Commit Changes
## Objective
Save local changes to the local Git repository.
## Steps
1. Ensure files are staged.
2. Enter the commit command with a message: `git commit -m "Your commit message"`
![Git Commit](img/5.png)
3. Verify the commit: `git log --oneline`
![Git Log](img/6.png)