<commit_before># Commit Preview & Multi-file Diffs

## :tipping_hand_woman: Status

Proposed

## :memo: Summary

Give users an option to, before they make a commit, see diffs of all staged changes in one view, akin to the [`Files changed` tab in pull requests on github.com](https://github.com/atom/github/pull/1753/files).

## :checkered_flag: Motivation

So that users can view a full set of changes with more context before committing them.

Note that the multi-diff view is the MVP of this RFC, and we have identified `Commit Preview` to be the least frictional way to introduce this feature without making too many UX changes. Other planned features that will also make use of multi-diff view are:

- [commit pane item](#1655) where it shows all changes in a single commit
- [new PR review flow](https://github.com/atom/github/blob/master/docs/rfcs/003-pull-request-review.md) that shows all changed files proposed in a PR
- (TBD) multi-select files from unstaged & staged panes to view diffs


## 🤯 Explanation

![staged changes](https://user-images.githubusercontent.com/378023/47497740-0a0b3200-d896-11e8-85af-7c644af9ca37.png)

#### Commit preview button
A new button added above the commit message box that, when clicked, opens a multi-file diff pane item called something like "Commit Preview" and shows a summary of what will go into the user's next commit based on what is currently staged.

#### Multi-file diff view<commit_msg>Add mockups for staged & unstaged panes<commit_after># Commit Preview & Multi-file Diffs

## :tipping_hand_woman: Status

Proposed

## :memo: Summary

Give users an option to, before they make a commit, see diffs of all staged changes in one view, akin to the [`Files changed` tab in pull requests on github.com](https://github.com/atom/github/pull/1753/files).

## :checkered_flag: Motivation

So that users can view a full set of changes with more context before committing them.

Note that the multi-diff view is the MVP of this RFC, and we have identified `Commit Preview` to be the least frictional way to introduce this feature without making too many UX changes. Other planned features that will also make use of multi-diff view are:

- [commit pane item](#1655) where it shows all changes in a single commit
- [new PR review flow](https://github.com/atom/github/blob/master/docs/rfcs/003-pull-request-review.md) that shows all changed files proposed in a PR
- (TBD) multi-select files from [unstaged](https://user-images.githubusercontent.com/378023/47553451-1e0c6d80-d942-11e8-981b-3c51d7df98d6.png) & [staged](https://user-images.githubusercontent.com/378023/47553450-1e0c6d80-d942-11e8-8b0c-d6c1d6a09c83.png) panes to view diffs

## 🤯 Explanation

![staged changes](https://user-images.githubusercontent.com/378023/47497740-0a0b3200-d896-11e8-85af-7c644af9ca37.png)

#### Commit preview button
A new button added above the commit message box that, when clicked, opens a multi-file diff pane item called something like "Commit Preview" and shows a summary of what will go into the user's next commit based on what is currently staged.

#### Multi-file diff view
{'fraction_non_alphanumeric': 0.08576935432059107, 'fraction_numerical': 0.051718599421779636, 'mean_word_length': 4.600719424460432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1188391', 'n_tokens_mistral': 1041, 'n_tokens_neox': 943, 'n_words': 384}