programing

스택 생성 날짜 가져오기

lovejava 2023. 5. 4. 17:50

스택 생성 날짜 가져오기

언제 재고가 생성되었는지 알 수 있는 방법이 있습니까?

git stash list스택만 나열됩니다.git stash show XXXXXX에는 모든 파일 및 변경 사항이 표시되지만, 저장소 생성 날짜는 표시되지 않습니다.

시도:

git stash list --date=local

다음과 같은 내용이 인쇄됩니다.

stash@{Thu Mar 21 10:30:17 2013}: WIP on master: 2ffc05b Adding resource

를 사용하여 이 작업을 수행할 수 있습니다.예를 들어, 상대 시간이 포함된 스택 목록이 생성됩니다.

git stash list --pretty=format:"%C(red)%h%C(reset) - %C(dim yellow)(%C(bold magenta)%gd%C(dim yellow))%C(reset) %<(70,trunc)%s %C(green)(%cr) %C(bold blue)<%an>%C(reset)"

저는 이 세트를 가지고 있습니다.[alias]내 섹션~/.gitconfig파일, 단순한 파일에 바인딩할 수 있습니다.sl명령:

[alias]
        co = checkout
        lg = log --graph --pretty=format:\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\" --abbrev-commit
        rl = reflog --pretty=format:\"%Cred%h%Creset %C(auto)%gd%Creset %C(auto)%gs%C(reset) %C(green)(%cr)%C(reset) %C(bold blue)<%an>%Creset\" --abbrev-commit
        sl = stash list --pretty=format:\"%C(red)%h%C(reset) - %C(dim yellow)(%C(bold magenta)%gd%C(dim yellow))%C(reset) %<(70,trunc)%s %C(green)(%cr) %C(bold blue)<%an>%C(reset)\"

(나도 비슷한 마크업을 하고 있음을 알 수 있습니다.log그리고.reflog)

다음은 다음과 같습니다.

상대 시간이 아닌 실제 날짜를 표시하려면 대체%(cr)와 함께%(ci).

git show stash@{0}또한 다른 정보와 함께 날짜를 출력합니다.

언급URL : https://stackoverflow.com/questions/15551618/get-the-creation-date-of-a-stash