Remote branch unexpectedly git in visual studio
2 answers
Step 1:
Create a list of all unreachable commits.
git fsck --full --no-reflogs --unreachable --lost-found
Step 2:
Print a list of commit messages for all commits in lost and found.
ls -1 .git/lost-found/commit/ | xargs -n 1 git log -n 1 --pretty=oneline
Step 3:
Find the missing commit. Create a new branch with the missing commit as the branch branch.
git checkout -b branch-name SHA
+2
source to share