git 4

drop된 stash 복구

문제: git stash drop으로 사라진 stash를 다시 사용해야 할 일이 생겼음 해결: 다음 명령으로 복구: git stash apply (stash 해시) drop을 방금 했다면 drop된 해시를 얻을 수 있음 예시) Dropped refs/stash@{0} (d2be07fdcba044d1e3d0eb746209900a784d41ce) 해시를 모른다면 다음 명령으로 얻어낼 수 있음: git fsck --no-reflog |awk '/dangling commit/ {print $3}' gitk를 이용해 각 해시의 파일 내용을 확인하며 탐색 가능 gitk --all $( git fsck --no-reflog |awk '/dangling commit/ {print $3}' ) https://stacko..

Code/Git 2021.09.24

VS2019 Git SSH 연결 시 passphrase 기억

문제: VS2019 Git에서 SSH로 연결한 리포지토리의 작업을 할 때 매 작업마다 passphrase를 요구함 원인: VS2019에서 ssh-agent와 연결된 시스템의 ssh.exe를 사용하지 않고 자체적으로 내장되어있는 ssh.exe를 사용해 저장된 passphrase를 불러오지 못함 해결: 64비트 윈도우 기준 해결법이다. developercommunity.visualstudio.com/t/visual-studio-fails-to-find-native-openssh/338518#T-N954852 Visual Studio Fails to find Native OpenSSH I have GIT configured to use the native OpenSSH that comes with the la..

Code/Git 2021.05.16