killchain-compendium/Miscellaneous/gitTools.md

12 lines
413 B
Markdown

# GitTools
* extract commits from repo
```sh
./extractor.sh <repo_with_.git> <targetdir>
```
* List `commit-meta.txt` files from all commits
```sh
separator="======================================="; for i in $(ls); do printf "\n\n$separator\n\033[4;1m$i\033[0m\n$(cat $i/commit-meta.txt)\n"; done; printf "\n\n$separator\n\n\n"
```
* Compare hashes of the commits. The one without a parent is the oldest one.