标签:rm -rf git 项目 缓冲 family base status font hub
1.上传一个项目到git
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/company/project.git
git pull --rebase origin master
git push -u origin master
2.修改文件提交
git status
git diff readme.txt 文件比对
git add readme.txt
git commit -m "modify readme.txt“
git push -u origin master
3.回退与前进
git log
git reset --hard HEAD^ 上上个[HEAD^^] 上100个[HEAD~100]
--前进
git reflog
git reset --hard ac04b6
4.撤销未提交到缓冲区内的修改内容
git checkout --readme.txt
5.删除文件/文件夹
git rm 1.txt
git rm -rf dir
标签:rm -rf git 项目 缓冲 family base status font hub
原文地址:http://www.cnblogs.com/doctorsun/p/7465022.html