# git status

> 查看git工作区文件状态报告

## 状态输出

```
git status
```

* **无参数**

详细的状态输出

```bash
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        README

nothing added to commit but untracked files present (use "git add" to track)
```

## 紧凑的格式输出

```
git status --short|-s
```

* **参数**
  * file\_path (文件路径）

紧凑的格式输出

```bash
$ git status
M new.js
D edit.js
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wikinote.gitbook.io/git-learning/git-ji-ben-ming-ling/cha-xun/git-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
