Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
git-extras
GIT utilities -- repo summary, repl, changelog population, author commit percentages and more
-
Git
Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.
The README for the parent repo (https://github.com/arxanas/git-branchless) answers these questions in detail.
Short answer, recreating this tool's features in vanilla git requires using the reflog, which isn't user-friendly:
> Why not git reflog?
> git reflog is a tool to view the previous position of a single reference (like HEAD), which can be used to undo operations. But since it only tracks the position of a single reference, complicated operations like rebases can be tedious to reverse-engineer. git undo operates at a higher level of abstraction: the entire state of your repository.
I use Git via the GitHub Desktop client (https://desktop.github.com) and find it _very easy_ to use Git without issue by following a simple rule: don't be clever. I have branches, I commit, I squash merge via a Pull Request. No rebasing, no moving commits around. There might be workflows where rebasing etc. are important and certainly in those cases, using a GUI is probably not a great idea -- but it's certainly possible to use a GUI without issue if you keep your workflow simple.
There is a design for undoing changes to the staging area: https://github.com/arxanas/git-branchless/issues/10
The similar project [Jujube] (https://github.com/martinvonz/jj) has experimented with backing up even unstaged changes after every command, and apparently it works well for them, so we could do the same in the above design.
Undoing even untracked changes might be a bit much.
While GitUp is a GUI app, and only available for macOS, I think it's worth noting that it has some great undo/redo capabilities built in.
From what I understand, some of them were more feasible to develop because they implemented their own plumbing (GitUpKit), instead of relying on the official git plumbing.
https://gitup.co/
https://jonas.github.io/tig/
It doesn't have too many features, but the main thing it aims for - a better repo browser, it does really well in my opinion.
An ex-colleague of mine maintains a fork here
https://github.com/douglashill/GitUp/releases
Calling attention to this which has an undo command and has been very helpful for Git tasks: https://github.com/tj/git-extras
I like forgit a lot, been using it for a while
https://github.com/wfxr/forgit