Git 介绍和学习

1
2
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
1
2
3
4
$ mkdir learngit
$ cd learngit
$ pwd
$ git init
1
git add readme.txt
1
2
3
4
5
git status
git diff readme.txt
git add readme.txt
git commit -m "add distributed"
git status
1
2
3
4
git log
git reset --hard HEAD^
git reset --hard 1094a
git reflog #显示每一次的提交

Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

阅读全文