https://github.com/thatmattlove/git-clear-history
Quick & dirty tool to delete git repository commit history
https://github.com/thatmattlove/git-clear-history
bash-script git repository-management
Last synced: 3 months ago
JSON representation
Quick & dirty tool to delete git repository commit history
- Host: GitHub
- URL: https://github.com/thatmattlove/git-clear-history
- Owner: thatmattlove
- License: mit
- Created: 2018-12-09T08:30:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-09T08:34:32.000Z (over 7 years ago)
- Last Synced: 2025-07-02T21:04:50.481Z (about 1 year ago)
- Topics: bash-script, git, repository-management
- Language: Shell
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# git-clear-history
[](https://github.com/checktheroads/git-clear-history/issues)
[](https://twitter.com/checktheroads)
`git-clear-history` is a simple Bash script that deletes the commit history of a given branch and (optionally) pushes the "scrubbed" branch back to the remote repository.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/checktheroads/git-clear-history.git
```
2. (Optional) Make the script executable:
```
chmod +x ./git-clear-history/git-clear-history.sh
```
3. (Optional) Copy the executable to your local `bin` directory:
```
cp ./git-clear-history/git-clear-history.sh /usr/local/bin/git-clear-history
```
## Usage
From your repository, run the `git-clear-history ` command, for example:
```bash
git-clear-history master
```
You'll be asked if you want to push your changes now or not:
```
Are you ready to push? (Y/N)
Pushing...
```
## Authors, Copyright & Licensing
Copyright © 2018 [Matt Love](https://twitter.com/checktheroads).
Licensed for use under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.