GitXplorerGitXplorer
l

git-xcleaner

public
20 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
d18df7f66ffc3ffa848dc1cfc685a4aea4fdbeb7

Drop Remote option - was not working correctly, sorry

llzap committed 3 years ago
Unverified
9e5b2d0897203531819da3f9cf3e6128a8fdb4c4

Reformat with tabs, yeah I know

llzap committed 3 years ago
Unverified
9c7d2acaa0480b30b70c54c26c0af2e381a58203

Implement pruned cleaning properly

llzap committed 3 years ago
Unverified
fc5de5237aba4579b265bf9b5e3c53fe4e010689

Remove unnecessary resize call

llzap committed 3 years ago
Unverified
2360463897e92e255b8542e419287ebd3fb49241

Added email

llzap committed 6 years ago
Unverified
911cee80a2abe34b69fa1b91aadb0f4a98d7a510

Added install section

llzap committed 8 years ago

README

The README file for this repository.

git-xcleaner

TUI utility for interactive and fast git topic branch cleanup. Upstream site at https://github.com/lzap/git-xcleaner

Main menu

Selection

Short demonstration

Requirements

  • bash
  • whiptail
  • resize

Usage

Install package or drop git-xcleaner on your path and

$ git xcleaner

I DO NOT recommend running garbage collection after cleanup, this can wipe mis-deleted branches:

$ git gc

If you want to do this, do it prior running cleaning, so you are still able to recover after few weeks.

Also, it is a good idea to prune branches prior cleaning:

$ git fetch --prune

Installation

On Fedora do yum install git-xcleaner, on other distros do this:

TARGET=/usr/local/bin/git-xcleaner
curl https://raw.githubusercontent.com/lzap/git-xcleaner/master/git-xcleaner > $TARGET
chmod +x $TARGET

Documentation

See the manual page.

How to undelete

If you mis-deleted a branch and ignored all the warnings in documentation and on the screen, check out this file which contains all the deleted branch names and commit shas:

$ cat ~/.git-xcleaner.log
Deleted branch feature_42 (was d82f87f).
Deleted branch feature_21 (was 796b718).

Now you know the sha, if you haven't run git garbage collection, you can still restore the branch with:

$ git checkout d82f87f
$ git checkout -b restored_branch_name

Authors

  • Lukáš Zapletal (lzap_at_redhat_dot_com)

License

GNU GPL v2. See the LICENSE file.

TODO

  • Fedora package
  • show some details for each branch (sha, last commit message)
  • fuzzy comparison of commit messages