killchain-compendium/Miscellaneous/gitTools.md

12 lines
413 B
Markdown
Raw Normal View History

2022-11-13 16:00:22 +01:00
# 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.