Project

git_oops

0.0
The project is in a healthy, maintained state
git_oops provides an interactive interface to help users recover deleted Git commits safely. It features a user-friendly selection interface, commit preview, and safety measures to prevent data loss.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 3.12
~> 1.59

Runtime

~> 0.8.0
~> 1.3.0
~> 0.23.1
 Project Readme

Git Oops

A friendly tool to help recover deleted Git commits safely and conveniently.

Help banner Option Reset Option Reset Result

Installation

Install the gem by running:

gem install git_oops

Usage

The main command is goops reset, which helps you interactively restore deleted Git commits:

# Basic usage - shows last 20 commits from reflog
goops reset

# Show more commits from reflog
goops reset --limit 30

# Show more commits in current log
goops reset --log-limit 10

# Search commits by keyword
goops reset --search "fix"

# Skip warning messages
goops reset --no-warning

Features

  • 🔍 Interactive commit selection with arrow keys
  • 🔎 Search commits by keyword
  • 💾 Option to backup current state before restoring
  • ⚠️ Safety warnings to prevent accidental data loss
  • 🎨 Colored output for better readability

Options

  • --limit NUMBER - Number of commits to display from reflog (default: 20)
  • --log-limit NUMBER - Number of commits to display in current log (default: 5)
  • --search KEYWORD - Search commits by keyword
  • --no-warning - Skip warning messages

Development Guide

Setup Development Environment

git clone https://github.com/rubykachu/git_oops.git
cd git_oops
bin/setup

Debug

  1. Add require 'pry' to your code
  2. Insert breakpoint with binding.pry
  3. Run gem with bundle exec exe/goops reset

Test Changes Without Reinstalling

# Run directly from source
bundle exec exe/goops reset [options]

# Or create alias for development
alias gdev="bundle exec exe/goops"
gdev reset [options]

Release Process

  1. Update version in lib/git_oops/version.rb
  2. Update CHANGELOG.md
  3. Run release script:
bin/release

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rubykachu/git_oops.

License

The gem is available as open source under the terms of the MIT License.

Logo

Logo