红联Linux门户
Linux帮助

Git使用小结

发布时间:2014-08-03 10:06:14来源:linux网站作者:faith_boys

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库中的文件更新到你的文件夹下