


Read Usage
for what
- git extra diff tool for Excel file
- By transferring Excel file metadata to csv file through tool
go-excelize
, git diff can change content after all instead of facing binary changes.
Features
- support windows macOS linux git diff
- subcommand for diff excel can ignore
-
--ignore-read
ignore read excel file error
-
--ignore-parse
ignore excel file to csv error
- more perfect test case coverage
- more perfect benchmark case
usage
# install at ${GOPATH}/bin
$ go install -v github.com/sinlov/git-extra-diff-excel/cmd/git-extra-diff-excel@latest
# install version v1.0.0
$ go install -v github.com/sinlov/git-extra-diff-excel/cmd/git-extra-diff-excel@v1.0.0
remember binary install path, if you use go install
in $GOPATH/bin
- add git diff excel config
# replace <git-extra-diff-excel> full path for installation
git config --global diff."excel".textconv "<git-extra-diff-excel> csv"
# go install can use as
# linux or macOS
git config --global diff."excel".textconv "$(which git-extra-diff-excel) csv"
# windows powershell
git config --global diff."excel".textconv "$((Get-Command git-extra-diff-excel).Source.Replace(`"\`", `"/`")) csv"
# add binary config
git config --global diff."excel".binary true
at file ~/.gitconfig
will add config like /Users/sinlov/go/bin/git-extra-diff-excel
is install path
[diff "excel"]
textconv = /Users/sinlov/go/bin/git-extra-diff-excel csv
binary = true
[diff "excel"]
textconv = C:/Users/sinlov/go/bin/git-extra-diff-excel.exe csv
binary = true
project excel diff config
- at want to use Excel diff, project root file
.gitattributes
add config
*.xlsx diff=excel
*.XLSX diff=excel
*.xls diff=excel
*.XLS diff=excel
-
then submit .gitattributes
to take effect
-
If you change the Excel file again, you can use the command to see the diff changes.
$ git diff --word-diff=color --unified=1
─────────────────────────────────────────────────────────────┐
• DataTables/demo/Datas/__tables__.xlsx:7: SheetName: Sheet1 │
─────────────────────────────────────────────────────────────┘
,placeholder.TbItem3,item3,TRUE,item_3.xlsx
,placeholder.TbItem4,item4,TRUE,item_3.xlsx
# or
$ git diff --word-diff=color --cached
─────────────────────────────────────────────────────────────┐
• DataTables/demo/Datas/__tables__.xlsx:7: SheetName: Sheet1 │
─────────────────────────────────────────────────────────────┘
,placeholder.TbItem3,item3,TRUE,item_3.xlsx
,placeholder.TbItem4,item4,TRUE,item_3.xlsx
or use sourceTree or fork will show change content

dev
Contributing

We welcome community contributions to this project.
Please read Contributor Guide for more information on how to get started.
请阅读有关 贡献者指南 以获取更多如何入门的信息