1

I have some problem after commit and checkout on another branch.

First I commit last update development and position commit on HEAD, but HEAD is not a branch.
So I checkout branch master and check on history log there are no results from my last commit.

Does anybody know how to get my last commit ?
I already checkout HEAD but same result, like master branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Nugka
  • 301
  • 2
  • 15
  • 1
    I'm not sure I understand the question, but if you indeed made a commit, then `git reflog` should help you find it. – TTT Aug 10 '21 at 05:03

1 Answers1

0

First, check your branches: recent repositories could use main instead of master:

git branch -avv
git status

Then switch to the appropriate branch to find back your commit:

git switch anBranch

As commented, if none of those branches reference your commit, git reflog should still be able to list said commit: you can then recover it.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250