Skip to main content

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

  1. Add files to the staging area: git add .

Git Add

  1. Verify that files are staged: git status

Git Status Staged


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

  1. Verify the commit: git log --oneline

Git Log