---
title: File states and repositories
description: Follow a change from the working directory through staging and a local commit to a remote repository.
---

import WorkshopRecordingLink from '../../../../components/workshops/WorkshopRecordingLink.astro';

[Git and GitHub Workshop: CryptX 2.0](https://www.youtube.com/watch?v=fRzFBDPsmEI)

<WorkshopRecordingLink href="https://youtu.be/fRzFBDPsmEI" />

## Three states for a change

The session introduces three states that describe a file as you prepare a change:

- **Modified:** you have changed the file in your working directory.
- **Staged:** you have selected the current changes to include in the next snapshot.
- **Committed:** Git has recorded the selected changes in the local repository's history.

The recording introduces these states at [29:46](https://youtu.be/fRzFBDPsmEI?t=1786), then explains staging at [29:58](https://youtu.be/fRzFBDPsmEI?t=1798) and modified files at [30:38](https://youtu.be/fRzFBDPsmEI?t=1838).

## Local and remote repositories

A **local repository** is the copy on your computer, where you edit files and record commits. A **remote repository** is a hosted copy that collaborators can access online. A commit records work locally; publishing it to the remote is a separate step. [The workshop distinguishes local and remote repositories](https://youtu.be/fRzFBDPsmEI?t=1614).

[Continue to the hands-on workflow](/docs/en/workshops/git-and-github/fork-clone-and-change)
