View gitcheats.txt
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
# List all files in a folder in a git repository by last commit date | |
git ls-tree --name-only HEAD | while read filename; do echo "$(git log -1 --format="%ci " -- $filename) $filename"; done | sort -r | |
# zip up an archive of each commit | |
for i in `git log --format=%H`; do git archive $i --format=zip -o $i.zip; done | |
# zip up an archive of each commit | |
git rev-list --all | while read h; do git archive --format zip -o $h.zip $h; done | |
# zip up an archive of each commit with number of commit added to hash |