Thank you for your interest in contributing! This document explains how to set up a local development environment, the project conventions, and how to submit changes.
- Getting Started
- Development Workflow
- Project Structure
- Code Style
- Submitting a Pull Request
- Reporting Bugs
- Requesting Features
- Node.js 20 or higher
- npm (comes with Node.js)
- Git
# 1. Fork the repository on GitHub, then clone your fork
git clone https://github.com/<your-username>/git-history-cleaner.git
cd git-history-cleaner
# 2. Install dependencies
npm install
# 3. Start the development server
npm run devThe app will be available at http://localhost:5173.
| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server with hot-reload |
npm run build |
Type-check and build for production |
npm run preview |
Preview the production build locally |
npm run lint |
Run ESLint across all source files |
Before opening a pull request, make sure all of the following pass locally:
npm run lint
npm run buildgit-history-cleaner/
├── src/
│ ├── App.tsx # Root component — main UI and script generation logic
│ ├── ErrorFallback.tsx # Error boundary fallback UI
│ ├── main.tsx # React entry point
│ ├── index.css # Global styles and CSS custom properties
│ ├── components/
│ │ └── ui/ # Reusable shadcn/ui-based components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Shared utility functions
│ └── styles/ # Additional style modules
├── public/ # Static assets served as-is
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
src/App.tsx— Contains the form, script-generation logic, and command explanations. Most feature work happens here.src/components/ui/— Primitive UI components built on Radix UI and styled with Tailwind CSS. These are generally not modified directly; prefer composing them inApp.tsxor new feature components.
- TypeScript — All new code should be written in TypeScript with proper typing. Avoid
any. - Functional components — Use React functional components and hooks; no class components.
- Tailwind CSS — Use Tailwind utility classes for styling. Avoid inline
styleprops. - Formatting — The project uses ESLint (
npm run lint). Fix all lint errors before opening a PR. - Comments — Keep comments minimal and purposeful. Self-documenting code is preferred.
-
Create a branch from
mainwith a descriptive name:git checkout -b feat/my-new-feature # or git checkout -b fix/issue-description -
Make your changes and commit with clear, concise messages:
git commit -m "feat: add confirmation dialog before script download" -
Run checks before pushing:
npm run lint && npm run build -
Push your branch and open a pull request against
main:git push origin feat/my-new-feature
-
In the PR description, explain:
- What the change does
- Why it is needed
- Any relevant screenshots or recordings for UI changes
Pull requests are reviewed on a best-effort basis. Small, focused PRs are merged much faster than large ones.
Please open a GitHub issue and include:
- A clear description of the bug
- Steps to reproduce
- Expected vs. actual behavior
- Browser and OS information
- Any relevant screenshots or console errors
For security vulnerabilities, please follow the process described in SECURITY.md rather than opening a public issue.
Open a GitHub issue with:
- A description of the feature and the problem it solves
- Any relevant examples or mockups
Thank you for helping improve Git History Cleaner! 🧹