Skip to content

Displays a tabular difference of a csv file or a split difference of any file in an Atom pane.

License

Notifications You must be signed in to change notification settings

jstritch/git-tabular-diff

Repository files navigation

CI Status

git-tabular-diff

It is difficult to review changes made to csv files using a traditional Git difference. At other times, a Git difference is more meaningful when displayed side-by-side. The git-tabular-diff package provides both tabular and split views for these use cases.

The split view invokes the Git diff machinery, enabling textconv display of binary files when configured. Text files display in the split view without configuration. A split view of a jpg image appears below. To learn about configuring textconv, visit gitattributes[5].

Split view

Settings allow ignoring case and/or white space in the tabular view. The following screen shot shows a tabular view of csv file changes.

Tabular view

To use git-tabular-diff, select a file in the TreeView, Git panel, or the active text editor and invoke either the git-tabular-diff:compare-selected-files or git-tabular-diff:compare-selected-split command. The commands are available from the context menus and bound to the key sequences alt-g alt-d and alt-g ctrl-d by default. A new Atom pane opens displaying the changes between the working tree and the head revision. A pane is only opened if differences are found. If multiple files are selected, the differences appear in a single pane.

Any git-tabular-diff view may be saved to a file with the saveAs ctrl-shift-s command. To open the file later, select the .gtd file in the Atom TreeView and invoke either git-tabular-diff command. A gtd file may be shared with other git-tabular-diff users.

Acknowledgments

Much of the HTML in the views is generated by the daff and diff2html packages.