重慶分公司,新征程啟航
為企業(yè)提供網(wǎng)站建設(shè)、域名注冊(cè)、服務(wù)器等服務(wù)
為企業(yè)提供網(wǎng)站建設(shè)、域名注冊(cè)、服務(wù)器等服務(wù)
本篇內(nèi)容主要講解“如何配置git diff”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“如何配置git diff”吧!
網(wǎng)站建設(shè)哪家好,找創(chuàng)新互聯(lián)!專(zhuān)注于網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、重慶小程序開(kāi)發(fā)公司、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶(hù)創(chuàng)新互聯(lián)還提供了三穗免費(fèi)建站歡迎大家使用!
需要的工具
libreoffice
diff
colordiff(可選)
#!/bin/bash # excel diff script this_xlsx=$1 other_xlsx=$2 if [ -z $other_xlsx ]; then echo "Error: file not allow empty" echo "usage: $0 this_file other_file" exit 1 fi tmp_dir=.tmp_$$ mkdir $tmp_dir soffice --convert-to this.slk $this_xlsx --outdir $tmpdir soffice --convert-to other.slk $other_xlsx --outdir $tmpdir # 如果沒(méi)有colordiff可以不需要 diff -u $tmpdir/`basename ${this_xlsx%.*}`.this.slk $tmpdir/`basename ${other_xlsx%.*}`.other.slk |colordiff
在.gitattributes
文件中加入如下內(nèi)容
*.xlsx diff=excel *.xls diff=excel
在.git/config
文件中加入
[diff "excel"] command = path_for_excel_diff_script
到此,相信大家對(duì)“如何配置git diff”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢(xún),關(guān)注我們,繼續(xù)學(xué)習(xí)!