# Add and Restore

Type&#x20;

```
git status
```

&#x20;to see the status of this repository.

<figure><img src="https://content.gitbook.com/content/cxcvbsS3tjLhOUUTuRd3/blobs/hHgLuwLpt7P6UgjukEgD/image.png" alt=""><figcaption></figcaption></figure>

I created a file called **hello.bat**, but I have not added it to the repo. A file can be in the folder, but not managed by Git. Type&#x20;

```
git add hello.bat 
```

to stage file(s) **hello.bat**.&#x20;

<figure><img src="https://content.gitbook.com/content/cxcvbsS3tjLhOUUTuRd3/blobs/vBR3qvIJVIFwBGtizUnY/image.png" alt=""><figcaption></figcaption></figure>

Prior to this, the file is not yet tracked. _Stage_ means that a file is made ready to add to the repository but is not yet added. We can continue to make changes to that file without those changes being copied to the repository. None of those changes are recorded and it will not be possible to revert to these versions.

The format of the command is&#x20;

```
git add name
```

to stage a file or directory.

If I think I have mangled the file I am working on, I can type&#x20;

```
git restore filename
```

to get the last good version of the file in the repo and overwrite the one in my working directory.
