[git] git hash 얻기

etc tools 2016. 8. 24. 16:16


git hash를 얻는 부분이다. 


 yte

길게 보려면 rev-parse를 쓸 수 있다.


$ git rev-parse master

0effa0fcc670fc999ee979e95be931decba13114



긴 hash라서 짧은 hash를 이용하려면 아래와 같이 사용할 수 있다. 1byte째부터 7byte까지가 short hash이다. 



$ git rev-parse --short master

0effa0f



$ git log -1 --pretty=format:%h

0effa0f



$ git describe --always

0effa0f

'etc tools' 카테고리의 다른 글

[git] git 저장소 변경하기  (0) 2017.03.16
[git] git log 범위  (0) 2016.08.24
artifactory 설치하기  (0) 2016.01.30
[gradle] provided compile  (0) 2015.11.30
gradle 2.9 - 50% 줄어든 컴파일 속도  (0) 2015.11.26
Posted by '김용환'
,