https://github.com/bennycode/git-trauma
Automatically fixes common Git problems.
https://github.com/bennycode/git-trauma
git
Last synced: 9 months ago
JSON representation
Automatically fixes common Git problems.
- Host: GitHub
- URL: https://github.com/bennycode/git-trauma
- Owner: bennycode
- Created: 2024-06-19T09:51:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-11T16:08:31.000Z (9 months ago)
- Last Synced: 2025-04-11T17:24:51.320Z (9 months ago)
- Topics: git
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/git-trauma
- Size: 411 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# git-trauma
The `git-trauma` wizard is a little tool to fix common Git problems. Simply run it in your Git repositories and let it guide you through fixing popular Git issues. Easily squash commits or fix "fatal loose object" errors.

## Motivation
I was tired of my Git repositories sometimes misbehaving and having to remember all the complex Git commands to handle these situations. Let's be honest, who memorizes `git reset $(git commit-tree HEAD^{tree} -m "Reset")`? I had these commands scribbled in a notebook but I thought it would be much cooler to have a small tool that executes them directly in my Git repositories. So, I created "git-trauma" to save me from all the traumas I've had using Git in my projects.
## Installation
Install it globally using:
```bash
npm i -g git-trauma
```
Navigate to your Git project and run the following inside of it:
```bash
git-trauma
```
## How it works?
It inspects your local `.git` directory to determine your Git settings. Then, a wizard guides you through selecting what needs to be fixed. Once you've made your choices, it runs the necessary Git commands for you, eliminating the need to remember them yourself.
## Features
- Fixing `fatal: loose object is corrupt` errors
- Squashing all commits into one
- Triggering empty commits
## Resources
- https://github.com/bennycode/welovecoding.github.io/wiki/Working-with-Git