I work for a small company and our Git repo is a bit messy. I just did a git pull and my changes made earlier today are gone!
When I work on HEAD on the main branch, git log shows my last commit b94940c63ef965ce45b0d64ccfba4359134d2552 in its history.
Now, if I do git log filename for a problem file that has lost my changes, this commit is not displayed (only an earlier commit is displayed).
By executing git log --follow filename , my commit b94940c63ef965ce45b0d64ccfba4359134d2552 is shown as the most recent.
And of course, if I do this:
git checkout b94940c63ef965ce45b0d64ccfba4359134d2552 git log filename
then the commit is displayed and my changes are in the file!
In other words, the commit I made is shown in the branch history (blocking merging of branches), but individual modified files do not have this commit in their history! (unless I explicitly check what to do).
Questions:
git git-log
UsAaR33
source share