> For the complete documentation index, see [llms.txt](https://p0db0t.gitbook.io/pentest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://p0db0t.gitbook.io/pentest/other/git.md).

# Git

* Basic Usage

```bash
## ------------------| Git Genaral
git clone <URL>
git status
git add .
git status
git commit -m "CommitComment>
git push 

## ------------------| Git Branch
git checkout -b <BranchName>
git status
git add .
git commit -m "CommitComment>
git push --set-upstream origin <BranchName>

## ------------------| Git Basic
git log
git status
git reflog
git reset --hard
git diff <hash>
```

* Git Hooks

```bash
## ------------------| sudo git pull
## put shell in 
vi .git/hooks/post-merge
chmod +x .git/hooks/post-merge
```

* [GitTool](https://github.com/internetwache/GitTools)

```bash
## ------------------| Finder
python3 gitfinder.py -i urllist.txt

## ------------------| Dumper
./gitdumper.sh http://target.tld/.git/ dest-dir

## ------------------| Extractor
./extractor.sh source-dir destination-dir
```
