(I have already worked around the issue, but just would like to report
it and perhaps discuss - please cc'd as I am not subscribed).
I noticed one or two most recent commits I made a few days ago is not around,
so I thought I have mis-remembered it or forgot to do 'git add' (it was adding
notes file from somebody else). But then I saw in my bash command history that
I did all the right things so the new files must be committed somewhere.
Then I google'd, and read about 'git reflog', and indeed I did commit those
new files 3 days ago, but they were not applied after a particular rebase
origin. I do a fetch/rebase
every few days, normally straight-forward without collision since I am working
in some niche area
of a busy project.
Anyway, I was able to do 'git checkout -b recovery_branch
to recover the whole thing. This gets me a bit worried - as it is a busy
and I have some 20-30 local commits which are probably staying local
for my convenience for months and years, and I do git rebase all the time.
The only thing different I do this time, as far as I see, was to do 'git branch
-m master master_date'
(so that I can do a cleaner master with tidied up and collapsed/refactored
commits of local changes)
just before. The repo is on ext4, with a healthy amount of empty space.
The commits which disappeared were the most recent 3. and git fsck
/--strict don't show those disappearing ones.
I seem to remember I had a similar incident (may or may not be with a 'git
branch -m currentbranch' - I don't remember)
but the new HEAD was so wrong - and essentially just a few local commits were
I did a 'git checkout -b recovery_branch
and just forgotten about it soon.
Any idea how this might happen, and perhaps make sure it does not happen again,
By the way, this is all essentially on fedora x86_64 linux.
$ git --version
git version 126.96.36.199
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html