客户端向服务器提交的整个过程(一个很是有用的git网站:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)git
(1) 添加文件github
git init
git add *.py
git commit -m "facerec v1"shell
--从指定的提交历史中签出指定文件服务器
git checkout 8eb672337cc683ce1c6683ceb95f8f1782400a93 -- 'latex/paperSource.tex'网站
git remote add origin https://github.com/AbrLiu/facerec.git --让origin指向一个地址,至关于给这个地址起了别名url
git remote set-url origin git@github.com:Abrliu/facerec.git
git push -u origin mastercode
---与注释相关的操做blog
git log --查看注释rem
git commit --amend --而后输入要修改的注释内容,整个输入界面的操做与vi一个,i是插入,wq是退出。it
(2) --删除版本库中的文件
git rm test.txt
git commit -m 'remove test.txt'
(3)查看暂存区(index)中的内容git
ls
-files --stage