For some reason I have some unreachable commits, that only git log --all
can show:
git log --graph --all --oneline
* B2.1 (HEAD -> main)
* B2
| * A2.1
| * A2
| | * B1
| |/
|/|
* | B
/
| * A1
|/
* A
And I want to use git rebase -i --root
to edit content from A
to solve pushing tags containing secret, but that command only get to B
, not A
. As I don’t really care about commit parenthood since this is a docs project, I think this can be solved by flattening the history to:
* B2.1 (HEAD -> main)
* B2
* A2.1
* A2
* B1
* B
* A1
* A
There are tags attaching to the commits on both branch, and I want to preserve the tag message of the tagged commits. The tag and commit objects can be changed. Is it possible?
12