首页 > 代码库 > GIT -> git rev-parse 笔记

GIT -> git rev-parse 笔记

显示分支

$git rev-parse --symbolic --branches

显示里程碑

$git rev-parse --symbolic --tags

显示引用

$git rev-parse --symbolic --glob=refs/*
refs/heads/master
refs/remotes/origin/HEAD
refs/remotes/origin/master

显示SHA1值

$git rev-parse HEAD
$git rev-parse master refs/heads/master
$git rev-parse $git rev-parse A^{} A^0 A^{commit}