本文共 1205 字,大约阅读时间需要 4 分钟。
[root@localhost helloworld-git]# echo "helloworld" >helloworld.txt [root@localhost helloworld-git]# git add helloworld.txt [root@localhost helloworld-git]# git commit -m 'helloworld-master' [master (root-commit) fddae22] helloworld-master Committer: root <root@localhost.localdomain> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email you@example.com After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 1 file changed, 1 insertion(+) create mode 100644 helloworld.txt [root@localhost helloworld-git]# git log commit fddae22359221092ade97421800f308f0d8e3886 Author: root <root@localhost.localdomain> Date: Thu Mar 21 16:50:51 2013 +0800 helloworld-master [root@localhost helloworld-git]# echo "world hello">helloworld.txt [root@localhost helloworld-git]# cat helloworld.txt world hello [root@localhost helloworld-git]# git checkout helloworld.txt [root@localhost helloworld-git]# cat helloworld.txt helloworld [root@localhost helloworld-git]#转载地址:http://ockib.baihongyu.com/