Git原始笔记

1.dir
2.mkdir lxit
3.cd lxit
4.git init(git仓库不要动!!! 除非用命令动它里面的文件,新添加的可以动)
5.ls
6.pwd

Config:
git config --global user.name 'Lt1940694428'
git config --global user.email '1940694228@qq.com'

Add file:
git add readme.txt

Add fileloder:
git add readme

Add fileloder :

Add desc:
git commit am '我这次干了什么'

Look:
git status

Like diff:
git diff readme.txt

Look ver information:
git log --pretty=online

roback:
git reset --hard HEAD^(上一次操作)
git reset --hard HEAD^^(上两次操作)

cat(only cat text):
cat readme.txt

roback ver:
git reset --hard 6fcfc89(darkyellow display)

checkout file:
sgit checkout --readme.txt



git add b.txt
git commit -m '添加b文件'
rm b.txt

recover file:
git checkout --b.txt

create key:
ssh-keygen -t rsa –C "1940694428@qq.com"

 

posted @ 2017-12-06 15:34  Sunsin  阅读(197)  评论(0编辑  收藏  举报