git reset --hard HEAD~1
mkdir 文件名
cd 文件名
touch index.html
 vim 文本名 退出时 按Esc键 输入:wq 回车
    
git init
    git add
    
    git add
    
git status
克隆
   git clone (git 文件链接)
    
文件所在地
pwd
提交备注
    
    git commit -am "   "
链接到git
git remote add origin 链接(git创建的文件链接)
更新后上传时如果上传失败
    git remote add origin
    
上传git 
    
    git push -u origin master
    
长期存储密码
    
    git config --global credential.helper store
    
创建分支到切换分支
git checkout -b masters(分支名masters)
原文:http://www.cnblogs.com/89yx/p/7159689.html