Skip to content

abikesa/git-audit-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✅ Recommended GitHub Repo Layout

git-audit-lab/
├── study/                    # The actual Git repo with commits and tag
│   ├── .git/                 # Hidden Git history (already initialized)
│   ├── data/
│   ├── analysis/
│   ├── figures/
│   ├── README.md
│   └── ... (tag v1.0 exists here)
├── directory_structure.py    # Scaffolding-only script
├── git_fraud_casebuilder.py  # Full fraud simulation & Git commits
├── .gitignore                # Optional: ignore .pyc, __pycache__/
└── README.md                 # Instructions for interns (see below)

🧳 What to Push

You only need to push the outer repo (not the inner .git/ from study/). Here's how:

1. Create a New GitHub Repo

Call it something like git-audit-lab or ethical-research-lab.

2. From Terminal, in your Documents:

cd ~/Documents
mkdir git-audit-lab
mv study git-audit-lab/
mv git_fraud_casebuilder.py git-audit-lab/
mv directory_structure.py git-audit-lab/
cd git-audit-lab
touch README.md .gitignore

3. Initialize a new outer repo (not the one inside study/):

git init
git add .
git commit -m "Initial setup with study case and setup scripts"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/git-audit-lab.git
git push -u origin main

🔐 Be careful not to push study/.git/ — it’ll confuse things and may violate student repo expectations. This inner repo is meant to be explored, not versioned recursively.


🪧 Suggested README.md (outer repo)

# Git Audit Lab 🧪

This training kit teaches version control as an ethical tool, using a real-world inspired case of data manipulation.

## 🔍 Files

- `directory_structure.py`: Builds an empty research directory structure.
- `git_fraud_casebuilder.py`: Simulates data fraud and commits changes to a Git repo inside `/study`.

## 📁 study/

This is a Git repo **within** the folder—interns should `cd study/` and run forensic audits using:

```bash
git log
git diff HEAD~1
git checkout HEAD~1

They can analyze data and explore what changed, when, and why it matters.

🧠 Learning Goals

  • Practice Git forensically (not just for versioning)
  • Spot dishonest commit patterns
  • Reproduce analysis before and after data tampering

🚀 Setup

python git_fraud_casebuilder.py
cd study
python analysis/analyze.py

😅 All good—you're 99% there, just tangled a bit with shell vs file creation syntax. Here's how to cleanly finish the job:


🧼 Final Fix: Create .gitignore Properly

You're trying to write to a file, but you accidentally typed file content as if it were commands.

Let’s do it right now.


✅ Option 1: One-Liner (fastest)

echo "study/.git/
__pycache__/
*.pyc" > .gitignore

Then push:

git add .gitignore
git commit -m "Add .gitignore to ignore nested Git and bytecode"
git push

✅ Option 2: Use nano

nano .gitignore

Then paste the following inside the editor:

study/.git/
__pycache__/
*.pyc

Save:

  • Press Ctrl+O, then Enter
  • Press Ctrl+X to exit

Then:

git add .gitignore
git commit -m "Add .gitignore to ignore nested Git and bytecode"
git push

🎯 You're Done When...

  1. git status shows a clean tree

  2. .gitignore is committed

  3. Your GitHub repo shows:

    • README.md
    • directory_structure.py
    • git_fraud_casebuilder.py
    • study/ (with data/scripts)
    • .gitignore

You just built an entire forensic ethics lab with version control. Your interns won’t even know how good they have it. 🧠🔥 Let me know if you want a clean report_template.md for them to write up findings.

About

Forensic Play

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages