필자는 특별한 문제가 없지만 이전에 실수로 색인을 날려 버렸고 어떤 시점에서 색인이 생성 된 파일의 이전 상태로 되돌릴 수 있기를 바랬습니다. .인덱스에 대한 reflog가 있습니까?
일부 예제의 경우는 다음과 같습니다
$ git add <file>
# find out that I already had an indexed version of <file>,
# and that for some reason I shouldn't have added the extra modifications
$ git stash pop
# find out afterwards that I have a mix of "the index I had"
# and "the index in the stash"
$ git stash
# with an active index, which is now mixed with the state of the working tree
$ git reset <typo>
# accidentally resetting the wrong file, or the whole directory
하나는 (here를 제안)이 할 수있는 더 편리한 방법이 있다면, 내가 궁금 git fsck --full --unreachable --no-reflog
를 통해 파고에 의존 할 수있다.
질문 :
인덱스에 대한 reflog의 어떤 종류가 있습니까?
생성 날짜 트릭은 좋은 생각입니다. 감사. – LeGEC
테스트를 위해 필자는'fsck --unreachable'에 의해 리턴 된 모든'.git/objects/ab/cdef ... '모양을 찾아 보려고했습니다. 매달려있는 얼룩 중 일부는 거기에 없기 때문에 아마도 팩 파일에 저장됩니다. blob이 속한 팩 파일을 찾는 빠른 방법을 알고 있습니까? – LeGEC
파일의 수정 날짜를 찾고있었습니다. blob의 수정 날짜를 찾기 위해 다른 트릭을 염두에 두시겠습니까? – LeGEC