Last active
July 9, 2020 10:01
-
-
Save louisswarren/c1c9021ac08f317ad13cf203995cc9a0 to your computer and use it in GitHub Desktop.
Scripts for a git demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git ls-tree -r --name-only ${1:-master} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p .git/head | |
git config color.ui always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
watch -n 0.5 -t 'find -type f -not -path "./.git/*" | xargs tail -n +1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
watch -n 0.5 -ct git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
watch -n 0.5 -ct git diff --cached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
watch -n 0.5 -t 'rm -rf .git/head/*; git ls-tree --full-tree HEAD --name-only | while read x; do git show "HEAD:$x" > ".git/head/$x"; done; cd .git/head; find -type f | xargs tail -n +1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment