| ▲ | rmunn 3 hours ago | ||||||||||||||||
I have so many branches named `temp` or `before-rebase` for exactly that reason; I'm using them effectively as tags, but branches can be moved around with less ceremony than tags (since tags are designed to be for things like v1.2.3, placed once and then almost never moved again), so I usually just do `git branch before-rebase/some-feature` before running a big `rebase -i`. I've almost never needed to run `get reset before-rebase`. But I have often done `git log -p before-rebase` and compared that to the post-rebase state of the branch, to ensure that the merge-conflict resolution(s) that came up during the rebase haven't accidentally introduced an unintended change. | |||||||||||||||||
| ▲ | chrismorgan an hour ago | parent | next [-] | ||||||||||||||||
Diffing diffs is so valuable for that reason, seriously underrated. Once I even found a use case for diffing diff diffs. I also often wish to edit commits or resolve rebase conflicts or whatever by editing the patch rather than the files. | |||||||||||||||||
| ▲ | jolmg 3 hours ago | parent | prev [-] | ||||||||||||||||
> but branches can be moved around with less ceremony than tags `git tag -f` to move a tag. Personally, I just do `git show` when I'm feeling cautious, but I can generally just scroll up to find the last `git commit` I did with the hash in the output. `git reflog` should also have record of it, so everything else is kind of extra. | |||||||||||||||||
| |||||||||||||||||