Xcode commits (possibly outside of any branch) disappeared, how to get them back?

25 Views Asked by At

This could be something I overlooked, that the commit is not actually under any branch, and now it cannot be seen under Xcode -> Source Control navigator -> Repositories

The only place that seems having some details of this commit is under .git -> objects where 'f5' is definitely the first 2 characters of the ID of that commit.

But neither of these 2 files can be viewed in any way: enter image description here

Is it possible to get this commit back and how?

git reflog & git log only display the commits inside a branch, this should be the ID of the commit that I'm looking for f513102

$ git reflog
62566f0 (HEAD -> onboarding-ch) HEAD@{0}: checkout: moving from 74f55303e8b94ce00f7b34b9e9ad3094d558be21 to onboarding-ch
74f5530 (main) HEAD@{1}: checkout: moving from f5131027b344163de473b7cc4e0a3b9a83e133cd to f5131027b344163de473b7cc4e0a3b9a83e133cd
f513102 HEAD@{2}: commit (amend): - branch 'onboarding-ch'
6f82ade HEAD@{3}: commit: - branch 'onboarding-ch'
0

There are 0 best solutions below