Git 5

GIT : 옛날에 지우고 커밋한 파일 살리기

http://stackoverflow.com/questions/953481/restore-a-deleted-file-in-a-git-repo 매우 흥미롭군... 그냥, 작업하다 필요 없다고 생각해서 git rm을 했는데 나중에 다시 필요해지는 때가 있다... 물론 옛날때의 모습을 알아내는게 아니라 부활시켜야 하는 것임... Find the last commit that affected the given path. As the file isn't in the HEAD commit, this commit must have deleted it. git rev-list -n 1 HEAD -- Then checkout the version at the commit before. git checkout ^ -- 이..

Unix 2011.08.19

git 태그 관리 / git tag

http://leanu.tistory.com/entry/git-tag-%ED%8A%B9%EC%A0%95-commit-%EC%97%90-tag-%EB%8B%AC%EA%B8%B0 여기에 꼭 필요한 것만 정리가 잘 된듯. $ git tag -a 태그명 -m "메시지"가 원래 문법이기는 한데, 메시지를 생략하면... 태그가 커밋이면 커밋 메시지가 메시지로서 자동으로 입력된다. 물론, 꼭 커밋에 대해 태그 붙일 필요는 없다... 리눅스 커널 저장소는 "트리"에 태그 붙어있음. $ git rev-parse [Tag Name]그래서 태그가 뭘 가리키는지 보일 필요가 있는 경우... 이 명령어를 쓰게 된다. gitview 명령어를 쓰면 커밋에 붙은 태크도 보여줌.

Unix 2011.05.23