[git] diff for doc
This commit is contained in:
parent
07d36f6e29
commit
16ab96e480
45
.gitconfig
45
.gitconfig
@ -36,17 +36,58 @@
|
|||||||
rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" -
|
rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" -
|
||||||
cleanbr = remote prune origin
|
cleanbr = remote prune origin
|
||||||
cleanbrshow = remote prune origin --dry-run
|
cleanbrshow = remote prune origin --dry-run
|
||||||
|
cleanupbr = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
|
||||||
contains = !sh -c 'git branch -a --contains $1' -
|
contains = !sh -c 'git branch -a --contains $1' -
|
||||||
wdiff = diff --word-diff=color --unified=1
|
wdiff = diff --word-diff=color --unified=1
|
||||||
first = rev-list --max-parents=0 HEAD # or use log --reverse
|
first = rev-list --max-parents=0 HEAD # or use log --reverse
|
||||||
|
rebasestash = rebase --autostash # stash before rebase if needed
|
||||||
|
#Gitlab checkout merge request. e.g. get MR 5 on remote upstream git mr upstream 5
|
||||||
|
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
|
||||||
|
#Git reset upstream
|
||||||
|
ru = "!f() { \
|
||||||
|
REMOTES=$(git remote); \
|
||||||
|
REMOTE=\"origin\"; \
|
||||||
|
case \"$REMOTES\" in \
|
||||||
|
*upstream*) \
|
||||||
|
REMOTE=\"upstream\"; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
git fetch $REMOTE; \
|
||||||
|
git update-ref refs/heads/master refs/remotes/$REMOTE/master; \
|
||||||
|
git checkout master >/dev/null 2>&1; \
|
||||||
|
git reset --hard $REMOTE/master >/dev/null 2>&1; \
|
||||||
|
git checkout - >/dev/null 2>&1; \
|
||||||
|
}; f"
|
||||||
[branch]
|
[branch]
|
||||||
#New branch track remote
|
#New branch track remote
|
||||||
#autoSetupMerge = always
|
#autosetupmerge = always
|
||||||
|
# Rebase on git pull
|
||||||
|
#autosetuprebase = always
|
||||||
|
|
||||||
|
# in .gitattributes
|
||||||
|
# *.doc diff=word
|
||||||
|
# *.xsl diff=excel
|
||||||
|
# *.xlsx diff=zip
|
||||||
|
# *.docx diff=wordx
|
||||||
|
# *.png diff=exif
|
||||||
|
|
||||||
[diff "odf"]
|
[diff "odf"]
|
||||||
textconv=odt2txt
|
textconv=odt2txt
|
||||||
[diff "odt"]
|
[diff "odt"]
|
||||||
textconv=odt2txt
|
textconv=odt2txt
|
||||||
|
[diff "pandoc"]
|
||||||
|
textconv=pandoc --to=markdown
|
||||||
|
prompt = false
|
||||||
|
[diff "wordx"]
|
||||||
|
textconv = docx2txt_wrap
|
||||||
|
[diff "word"]
|
||||||
|
textconv = catdoc
|
||||||
|
[diff "excel"]
|
||||||
|
textconv = strings
|
||||||
|
[diff "zip"]
|
||||||
|
textconv = unzip -c -a
|
||||||
|
[diff "exif"]
|
||||||
|
textconv = exiftool
|
||||||
[difftool "meld"]
|
[difftool "meld"]
|
||||||
path = /usr/bin/meld
|
path = /usr/bin/meld
|
||||||
trustExitCode = false
|
trustExitCode = false
|
||||||
|
2
scripts/docx2txt_wrap
Executable file
2
scripts/docx2txt_wrap
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docx2txt $1 -
|
Loading…
Reference in New Issue
Block a user