This is "undo" for git. Amazing.
Go to file
2021-04-16 19:59:25 +05:30
.github 👽 change meta data 2021-04-10 13:07:17 +05:30
.gitignore Initial commit 2021-04-10 11:48:48 +05:30
CODE_OF_CONDUCT.md Initial commit 2021-04-10 11:48:48 +05:30
CONTRIBUTING.md Initial commit 2021-04-10 11:48:48 +05:30
LICENSE Initial commit 2021-04-10 11:48:48 +05:30
README.md ️ add ugit logo 2021-04-16 19:59:25 +05:30
ugit 🔨 minor tweaks 2021-04-15 20:42:09 +05:30

ugit

ugit logo

Undo your last oopsie 🙈️ in git without much effort

License: MIT Issues Twitter: bhupeshimself ugit demo gid

Why ugit

  • You did an accidental git command you didn't want to.
  • You don't want to waste your time searching on how to undo ...

What's in the box

ugit supports undoing following operations, some are a WIP. If you know of any operation that can be undone and is not in the list, make sure to send a quick PR 💛

  • Undo git commit
  • Undo git add
  • Undo git push
  • Undo git branch -D (branch delete)
  • Undo git pull
  • Undo git reset
  • Undo git merge
  • Undo git tag -d (tag delete)
  • Undo git stash apply
  • Undo git stash pop/drop/clear
  • Undo git tag (rename a tag)
  • Undo git rebase
  • Undo git cherry-pick
  • Undo accidental file delete (Restore a deleted file after a commit)
  • Undo git worktree remove (recover deleted work-tree)

Installation

ugit dependencies:

  1. Bash>=3
  2. GNU utils like awk, grep etc
  3. fzf

Install the script using wget

# Linux
wget -q https://raw.githubusercontent.com/Bhupesh-V/ugit/master/ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
# Mac
wget -q https://raw.githubusercontent.com/Bhupesh-V/ugit/master/ugit && chmod +x ugit && mv ugit /usr/local/bin

or curl

# Linux
curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
# Mac
curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/ugit && chmod +x ugit && mv ugit /usr/local/bin

Not satisfied? 😒

You can read my in-process guide on How to undo anything in Git

Author

👤 Bhupesh Varshney

☺️ Show your support

Support me by giving a if this project helped you! or just Twitter URL

Support via PayPal

📝 License

Copyright © 2021 Bhupesh Varshney.
This project is MIT licensed.

👋 Contributing

Please read the CONTRIBUTING file for the process of submitting pull requests to us.