- Review the Thoughtbot code-review guide for suggestions to follow when reviewing merge requests:[Thoughtbot](https://github.com/thoughtbot/guides/tree/master/code-review)
- See GitLab merge requests for examples: [Merge Requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests)
- To remove files from stage use reset HEAD where HEAD is the last commit of the current branch. This will unstage the file but maintain the modifications.
- To remove files from stage use reset HEAD where HEAD is the last commit of the current branch. This will unstage the file but maintain the modifications.
```bash
git reset HEAD <file>
```
```bash
git reset HEAD <file>
```
- To revert the file back to the state it was in before the changes we can use:
```bash
git checkout -- <file>
```
```bash
git checkout -- <file>
```
- To remove a file from disk and repo use 'git rm' and to rm a dir use the '-r' flag:
```sh
git rm '*.txt'
git rm -r <dirname>
```
```sh
git rm'*.txt'
git rm-r <dirname>
```
- If we want to remove a file from the repository but keep it on disk, say we forgot to add it to our `.gitignore` file then use `--cache`: