Daily Workflow

Staging & Commit

~25 min

Staging & Commit

This is the core Git workflow you'll use every day. We've set up a project with two files for you to practice with.

The Workflow

✏️
Make changes
Edit files
📦
Stage
Select changes
Commit
Save a snapshot
🔁
Repeat
Small, steady steps

Practice: Stage and Commit

Use the Terminal below to run commands and watch the VS Code view update in real time.

Steps

1

Check Current Status

See what Git knows about your files.

First, check the status of your repo:

git status

You will see two untracked files. Git sees them but is not tracking changes yet.

In VS Code

Look at the Source Control panel. You will see files marked with U (Untracked).

2

Stage a File

Choose what will go into your next commit.

3

Create a Commit

Save a snapshot with a clear message.

4

View Your History

See your commit in the log.

💻 Terminal

Terminal — /
Repository initialized with sample files.
Try: git status
$

📝 VS Code

Explorer
No files yet.
Click + to create a file.

Select a file to edit

Terminal vs VS Code Commands

ActionTerminalVS Code
Check statusgit statusSource Control panel shows changes
Stage one filegit add filenameClick + next to file
Stage all filesgit add .Click + at top of Changes
Commitgit commit -m "msg"Type message + click checkmark
View historygit logGit Graph extension

Pro Tips

  • Commit often - small, frequent commits are easier to understand and undo.
  • Write good messages - be specific about what changed and why.
  • Stage selectively - you do not have to commit everything at once.
  • Check status often - it is your best friend for staying oriented.
  • Flags - -m means message.
  • Status letters - U = Untracked, M = Modified, A = Added, D = Deleted.