您的位置:首页 > 其它

git checkout

2016-07-23 11:38 239 查看

Git单文件回滚至以前版本

step1: git reset [commit_id] [file_name]
回滚至以前版本

step2: git checkout -- [file_name]
使用 "git checkout -- ..." 忽略工作目录上的改动

step3: git add [file_name]
添加

step4: git commit
上传


Git用别的分支替换单个文件

git checkout [branch] -- [file name]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git checkout