git:如何从暂存的已删除文件中恢复未经修改的更改?

时间:2017-06-10 11:26:58

标签: git

我用git做了:

git commit fileA

然后我编辑了fileA

然后我意外地执行了

git rm fileA

有没有办法在执行fileA后恢复git rmgit resetgit checkout将丢弃我的修改,并在提交后获取fileA

1 个答案:

答案 0 :(得分:0)

不,执行CREATE OR REPLACE PROCEDURE R_T.Test1 ( Test1 IN OUT Reports.rep_type, date_parameter IN system_days.daytime%TYPE) AS BEGIN OPEN Test1 FOR select * from (select sum(max(case when code = 'C3_TOTAL_PROD' then NET_MASS_MTD_MTON else null end )) C3_TOTAL_PROD_MTD_MASS_S1, sum(max(case when code = 'C4_TOTAL_PROD' then NET_MASS_MTD_MTON else null end )) C4_TOTAL_PROD_MTD_MASS_S1, sum(max(case when code = 'S_TOTAL_PROD' then NET_MASS_MTD_MTON else null end )) S_TOTAL_PROD_MTD_MASS_S1 from MV_D_MAS where production_day between trunc(Date_Parameter, 'YEAR') and LAST_DAY(date_parameter) group by production_day ) a; END; 后无法恢复文件。

正如你所说的

git rm

git reset HEAD

将恢复到上一组文件。