Replies: 3 comments 1 reply
-
When using git-branchless, you should prefer to use
Tragically, it looks like you already had a
Information about hidden/rewritten commits is not stored in Git directly, and is instead stored out-of-band in a git-branchless-specific on-disk database. git-branchless and Git have different conceptions about what commits are "visible":
What you probably would have liked/expected to happen would be an undo operation consisting of a few steps, something like these:
The best way for you to do this in your current setup is to do an interactive undo with git-branchless can't undo the full logical operation in this case because it's informed about these operations individually, and it doesn't know which consecutive real operations are part of the same logical operation. You can alias
The invocation you performed could probably inform the user more effectively that transactions aren't being grouped.
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much for the detailed explanation! I felt like I was missing something obvious and I guess my One more question about the interactive undo mode -- I'm looking at the events that happen around a commit, and it looks like in event 52, (also I apologize if all this is already covered in the wiki somewhere, I couldn't find anything)
|
Beta Was this translation helpful? Give feedback.
-
thank you! I've been trying to understand git hook ordering so this is really helpful. |
Beta Was this translation helpful? Give feedback.
-
I tried to make a commit and then undo it with
git branchless undo
, but I can't figure out what changes the undo operation made to my repo -- it looks exactly the same to me as before the undo. Here are the exact commands I ran and the results.It says that it's "hiding" a commit, but as far as I can tell, there's no actual change to my commit graph --
refs/heads/main
is still pointing at the exact same commit, and the output ofgit log --oneline
is the same as before the undo operation.some notes:
git branchless init
to set it upBeta Was this translation helpful? Give feedback.
All reactions