Commit | Line | Data |
---|---|---|
df89f101 BA |
1 | #!/bin/sh |
2 | ||
3 | #initialize submodules, set-up .git/config and .gitattributes, and pre-push hook | |
4 | git submodule init && git submodule update --merge | |
5 | #filter for git-fat | |
6 | echo -e '*.pdf filter=fat\n*.tar.xz filter=fat' > .gitattributes | |
7 | #pre-push hook: git fat push, submodules update | |
1ddd1df2 | 8 | echo -e '#!/bin/sh\n./.git-fat/git-fat push\ngit submodule update --merge' > .git/hooks/pre-push |
df89f101 BA |
9 | #.gitfat file with remote on gitfat@auder.net |
10 | echo -e '[rsync]\nremote = gitfat@auder.net:~/files' > .gitfat | |
11 | #manual git-fat init: with relative path to binary | |
12 | #1] remove filter if exists http://stackoverflow.com/questions/12179437/replace-3-lines-with-another-line-sed-syntax | |
13 | sed -i '1N;$!N;s/\[filter "fat"\]\n.*\n.*//;P;D' .git/config | |
14 | #2] place new filter | |
1ddd1df2 | 15 | echo -e '[filter "fat"]\n\tclean = ./.git-fat/git-fat filter-clean\n\tsmudge = ./.git-fat/git-fat filter-smudge' >> .git/config |