git commit
gpg.commitsign = true
&& 와 같은 이유로 실패 할 수 있습니다 gpg
(어떤 이유로 든). 명령을 재 시도하면 빈 편집기가 열립니다. 메시지가 손실됩니다.
이 경우 작성된 커밋 메시지를 복구하고 동일한 메시지로 커밋을 다시 시도 할 수있는 방법이 있습니까?
에서 man git-commit
:
FILES
$GIT_DIR/COMMIT_EDITMSG
This file contains the commit message of a commit in progress. If git commit exits due to an error before creating a commit, any commit message that has been provided
by the user (e.g., in an editor session) will be available in this file, but will be overwritten by the next invocation of git commit.
따라서 repeat 대신 git commit
이전 메시지로 재 시도하려면 다음을 사용할 수 있습니다.
$ git commit -m "$(cat .git/COMMIT_EDITMSG)"
또는 일반적으로 (예 : 별칭에 적합) :
$ git commit -m "$(cat "$(git rev-parse --git-dir)/COMMIT_EDITMSG)")"
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다