linux下git安装
yum install -y git
git init
[root@Master git]# git init
Initialized empty Git repository in /opt/git/.git/git ls-files
test01.txt
[root@Master git]# git ls-files --stage
100644 d536f7a505b5c6cb54f032df7cb926d2d3546c34 0 test01.txt
[root@Master git]# git commit -m "first commit"
[master (root-commit) ef6cb82] first commit
1 file changed, 1 insertion(+)
create mode 100644 test01.txt
[root@Master git]# cat HEAD
cat: HEAD: No such file or directory
[root@Master git]# cd .git
[root@Master .git]# cat HEAD
ref: refs/heads/master
[root@Master .git]# cat
branches/ config HEAD index logs/ refs/
COMMIT_EDITMSG description hooks/ info/ objects/
[root@Master .git]# cat refs/
heads/ tags/
[root@Master .git]# cat refs/tags/
cat: refs/tags/: Is a directory
[root@Master .git]# cat refs/heads/master
ef6cb82572b1fffd2a73e9ee11f8ad6de056ef7c