git的使用帮助 一、上传代码 git status git add file(如果要删除工作目录的文件(即:工作目录有但是本地没有)同样git add) git commit -m "log that displayed others can make other people understand your work content. " git push (git push origin master) 二、撤回commit git commit --amend 更改commit 提交的内容 git reset --soft HEAD^   仅仅是撤回commit操作,您写的代码仍然保留 备注:HEAD^等价于HEAD~1。撤回俩次commit 则用HEAD~2. git reset --hard HEAD^ 撤回commit并且本地代码同样也被修改 三、找回git reset --hard HEAD^丢失的本地代码 git feflog 找到对应的commitID 然后git reset --hard commitID 二、git 的英文文档 git status: Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git