Skip to content

Instantly share code, notes, and snippets.

@dbapl
Forked from kbaird/git_binary_diff_gist
Last active August 1, 2024 14:33
Show Gist options
  • Save dbapl/e841d321bbb3ee77a3aa to your computer and use it in GitHub Desktop.
Save dbapl/e841d321bbb3ee77a3aa to your computer and use it in GitHub Desktop.
Diff setup for ~/.gitconfig, .gitattributes file for repository and helper scripts.
*.ods diff=odf
*.odt diff=odf
*.odp diff=odf
*.pdf diff=pdf
*.PDF diff=pdf
*.apk diff=apk
*.bz2 diff=bz2
*.gz diff=gzip
*.zip diff=zip
*.tar diff=tar
*.tgz diff=tar-gz
*.tar.gz diff=tar-gz
*.tar.bz2 diff=tar-bz2
[diff "odf"]
textconv=odt2txt
[diff "pdf"]
textconv=/usr/local/bin/pdftotext_git
[diff "apk"]
textconv = /opt/android-sdk/build-tools/23.0.2/aapt dump badging
[diff "bz2"]
binary = true
textconv = /bin/bzcat
[diff "gzip"]
binary = true
textconv = /bin/zcat
[diff "tar"]
binary = true
textconv = tar --to-stdout -tvf
[diff "tar-gz"]
binary = true
textconv = tar --to-stdout -tvzf
[diff "tar-bz2"]
binary = true
textconv = tar --to-stdout -tvjf
[diff "zip"]
binary = true
textconv = unzip -v
#!/bin/bash
pdftotext -layout "$@" -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment