# Making a Commit

See <https://git-extensions-documentation.readthedocs.io/en/latest/commit.html>

There are two steps to commit our changes. First, we decide which files/lines to be in the commit by staging them. Second, we give the commit a message to commit.

![](https://camo.githubusercontent.com/423dd7c7b778cdc7856b6f2053c624220e8f1228/68747470733a2f2f6769742d657874656e73696f6e732d646f63756d656e746174696f6e2e72656164746865646f63732e696f2f656e2f6c61746573742f5f696d616765732f636f6d6d69745f6469616c6f672e706e67)

Note: Unlike other source control management systems, git optimisitically allows us change files without locking it (it is a distributed source control management system and therefore never knows or cares who is changing a file on another computer).

Command line:

```
git add awesome_changes.txt # add the file to staging area
git commit
```

#### &#x20;<a href="#how-to-write-a-git-commit-message" id="how-to-write-a-git-commit-message"></a>

### &#x20;<a href="#how-to-add-only-a-portion-of-a-file" id="how-to-add-only-a-portion-of-a-file"></a>


---

# 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://gittutorial.gitbook.io/practical-git-via-gitextensions/how-to-make-a-commit.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.
