git 恢复单个文件的历史版本
首先查看该文件的历史版本信息:git log Default@2x.png
记录下需要恢复的commit版本号:如 9aa51d89799716aa68cff3f30c26f8815408e926
恢复该文件:git reset 9aa51d89799716aa68cff3f30c26f8815408e926 Default@2x.png
提交git:git commit -m "revert old file"
# 删除 untracked filesgit clean -f# 连 untracked 的目录也一起删掉git clean -fd# 连 gitignore 的untrack 文件/目录也一起删掉 (慎用,一般这个是用来删掉编译出来的 .o之类的文件用的)git clean -xfd# 在用上述 git clean 前,墙裂建议加上 -n 参数来先看看会删掉哪些文件,防止重要文件被误删git clean -nxfdgit clean -nfgit clean -nfdgit 恢复单个文件的历史版本的更多相关文章
- GIT 恢复单个文件到历史版本
首先查看该文件的历史版本信息:git log <file> 恢复该文件到某个历史版本:git reset 版本号 <file> 检出改文件到工作区:git checkout - ...
- git 恢复单个文件
首先查看该文件的历史版本信息:git log Default@2x.png 记录下需要恢复的commit版本号:如 9aa51d89799716aa68cff3f30c26f8815408e926 恢 ...
- git清空某个文件的历史版本
比如你要清空文件private.ini git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch priva ...
- Git查看单个文件修改历史
1 命令 git log --pretty=oneline 文件名 ➜ admin git:(feature/v1.5.0_20181202_group) git log --pretty=onel ...
- 清空Github上某个文件的历史版本
title: 清空Github上某个文件的历史版本 author: 青南 date: 2015-01-08 16:04:53 categories: [经验] tags: [Github,histor ...
- git查看某个文件修改历史
[git查看某个文件修改历史] 1.使用git命令 git whatchanged charge.lua 显示某个文件的每个版本提交信息:提交日期,提交人员,版本号,提交备注(没有修改细节) git ...
- Git恢复指定文件
Git恢复指定文件 修改这个文件的commit有哪些? git log -- <文件路径> 猜测需要还原的commit. 这个文件作了哪些更改? git diff <需要还原的com ...
- 【Git版本控制】git将单个文件回退到某一版本
暂定此文件为a.jsp 1.进入到a.jsp所在目录,通过 git log a.jsp查看a.jsp的更改记录 2.找到想要回退的版本号:例如 fcd2093 通过 git reset fcd2 ...
- GIT 单个文件还原到历史版本号
首先检查在历史文件中的版本号信息:git log <file> 将文件还原到历史版本号:git reset 版本号 <file> 文档工作区的检测:git checkout - ...
随机推荐
- HDU 2064 汉诺塔III (递推)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2064 约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下.由小到 ...
- JustOj 1486: Hello, world!
题目描述 This is the first problem for test. Since all we know the ASCII code, your job is simple: Input ...
- Codeforce 697A - Pineapple Incident
Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks ...
- MFC超链接
最近写一个小的对话框程序时,想加一个文本超链接,研究了一下,发上自己的研究成果,供大家参考.下面说说完整的步骤. (假定静态文本ID为ID_STATIC) 首先,设置鼠标的形状及响应鼠标点击 第一步, ...
- Spring基于的注解自动装配和依赖注入(***)
#自动装配的小Demo: package com.gyf.annotation; //DAO层 public interface UserDao { public void save(); } pac ...
- bzoj2152 / P2634 [国家集训队]聪聪可可(点分治)
P2634 [国家集训队]聪聪可可 淀粉质点分治板子 边权直接 mod 3 直接点分治统计出所有的符合条件的点对再和总方案数约分 至于约分.....gcd搞搞就好辣 #include<iostr ...
- Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration di
alexander@alexander-virtual-machine:~$ sudo apt-get install -y httpdE: Could not get lock /var/lib/d ...
- python简说(二十四)发送网络请求
一.get,post请求import requestsurl='http://127.0.0.1:8999/api/upload'# data = {'username':'testuser1','p ...
- poj 3744 Scout (Another) YYF I - 概率与期望 - 动态规划 - 矩阵快速幂
(Another) YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into th ...
- 前缀和与差分之IncDec sequence
参考链接:https://blog.csdn.net/hzk_cpp/article/details/80407014 题目链接:https://www.acwing.com/problem/cont ...