57 | | Once you have chosen which files to include in your next commit using `git add`, it is a good practice to review this list using `git status` and show the diff to be committed using `git diff --cached`. When you are satisfied with your changes, run `git commit`, which prompts you for the commit message. See the [#commitmessages section on commit messages in git] for more information on git conventions and expectations in commit messages. |
| 60 | `git status` gives you an overview of the current index and your working copy. Additionally, it lists the commands to revert local uncommitted modifications (`git checkout -- <filename>`) and to remove files from the next commit, but preserve the modifications in your working copy (`git reset HEAD <filename>`). |
| 61 | |
| 62 | Once you have chosen which files to include in your next commit using `git add`, it is a good practice to review this list using |
| 63 | {{{ |
| 64 | git status |
| 65 | }}} |
| 66 | and show the diff to be committed using |
| 67 | {{{ |
| 68 | git diff --cached |
| 69 | }}} |
| 70 | If you are not satisfied with your changes, you can keep changing your files. Note that you will have to add any new modifications to the index using `git add` again. Once you are satisfied with your change run |
| 71 | {{{ |
| 72 | git commit |
| 73 | }}} |
| 74 | which prompts you for the commit message. See the [#commitmessages section on commit messages in git] for more information on git conventions and expectations in commit messages. |