# 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>
