Git使用小结


git checkout <file> 将文件回归原始状态 
 
git status 查看版本库的状态 
 
git add <file> 添加一个文件 
 
git commit 提交文件的更改(会提示编写标题 使用Ctrl + X提交后,选Y,点击enter,完成提交) 
 
git reset HEAD^ --soft 回退上一层的操作 
 
git format -path -1  生成patch文件 
 
git config user.name "yourname"  设置你的名字 
 
git config user.email "youremail" 设置你的email地址
git clone gitserver@ipaddress <file> 将git库中的文件更新到你的文件夹下

相关内容