我有一个使用Spring Roo的项目。 Spring Roo改变了一些aj文件。我试图通过git tortoise上下文菜单恢复它们,但是它给了我一个空列表来恢复。
当我使用
时$git reset --hard
我仍然无法恢复更改。
c:\src\main\java\com\company\eorder\server\domain>git status
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: ../../../../../../../../../mockup/app/view/MyViewport.js
# modified: ../../../../../../../../../mockup/app/view/XXX_test_card.js
# deleted: ../../../../../../webapp/app/dao/RequisitionDataLocalStorageDAO.js
# deleted: ../../../../../../webapp/app/model/CCPhysician.js
# deleted: ../../../../../../webapp/app/model/ClinicalInfo.js
# deleted: ../../../../../../webapp/app/model/FileAttachment.js
# deleted: ../../../../../../webapp/app/model/Modality.js
# deleted: ../../../../../../webapp/app/model/Order.js
# deleted: ../../../../../../webapp/app/model/Patient.js
# deleted: ../../../../../../webapp/app/model/Physician.js
# deleted: ../../../../../../webapp/app/model/ReadingDoctor.js
# deleted: ../../../../../../webapp/app/model/RequisitionData.js
# deleted: ../../../../../../webapp/app/model/RequisitionTestForm.js
# deleted: ../../../../../../webapp/app/model/RequistionData_TMP.js
# deleted: ../../../../../../webapp/app/model/Specimen.js
# deleted: ../../../../../../webapp/app/model/Technologist.js
# deleted: ../../../../../../webapp/app/store/RequisitionLocalStorageStore.js
# deleted: ../../../../../../webapp/app/view/imaging_test_card.js
# modified: ../../../../../../../../../src2/.classpath
# modified: ../../../../../../../../../src2/.project
# modified: ../../../../../../../../../src2/.settings/org.eclipse.jdt.core.prefs
# modified: ../../../../../../../../../src2/.settings/org.eclipse.wst.common.component
# modified: ../../../../../../../../../src2/.settings/org.eclipse.wst.common.project.facet.core.xml
# modified: ../../../../../../../../../src2/eOrder.roo
# modified: ../../../../../../../../../src2/log.roo
# modified: ../../../../../../../../../src2/pom.xml
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/DiagnosticOrderLine.java
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/DiagnosticOrderLine_Roo_JavaBean.aj
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/Physician.java
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/Physician_Roo_JavaBean.aj
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/Requisition.java
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/Requisition_Roo_JavaBean.aj
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/web/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj
# modified: ../../../../../../../../../src2/src/main/java/com/company/eorder/web/RequisitionController_Roo_Controller.aj
# modified: ../../../../../../../../../src2/src/main/resources/META-INF/persistence.xml
# modified: ../../../../../../../../../src2/src/main/resources/META-INF/spring/applicationContext.xml
# modified: ../../../../../../../../../src2/src/main/resources/META-INF/spring/database.properties
# modified: ../../../../../../../../../src2/src/main/resources/log4j.properties
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/i18n/application.properties
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/spring/webmvc-config.xml
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/codesystems/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/codesystems/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/codesystems/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/codesystems/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/diagnosticorderlines/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/diagnosticorderlines/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/diagnosticorderlines/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/diagnosticorderlines/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/footer.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/loincs/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/loincs/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/loincs/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/loincs/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/menu.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlineparameters/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlineparameters/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlineparameters/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlineparameters/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlinesources/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlinesources/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlinesources/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderlinesources/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderspecimens/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderspecimens/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderspecimens/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/orderspecimens/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/patients/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/patients/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/patients/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/patients/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/physicians/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/physicians/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/physicians/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/physicians/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/requisitions/create.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/requisitions/list.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/requisitions/show.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/requisitions/update.jspx
# modified: ../../../../../../../../../src2/src/main/webapp/WEB-INF/web.xml
# modified: ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/PhysicianDataOnDemand_Roo_DataOnDemand.aj
# modified: ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionDataOnDemand_Roo_DataOnDemand.aj
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../../../../../../../../app_link.bat
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData.java
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_Configurable.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_JavaBean.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_Jpa_ActiveRecord.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_Jpa_Entity.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_Json.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/server/domain/RequisitionFormData_Roo_ToString.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/web/RequisitionFormDataController.java
# ../../../../../../../../../src2/src/main/java/com/company/eorder/web/RequisitionFormDataController_Roo_Controller.aj
# ../../../../../../../../../src2/src/main/java/com/company/eorder/web/RequisitionFormDataController_Roo_Controller_Json.aj
# ../../../../../../../../../src2/src/main/webapp/WEB-INF/views/requisitionformdatas/
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataDataOnDemand.java
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataDataOnDemand_Roo_Configurable.aj
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataDataOnDemand_Roo_DataOnDemand.aj
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataIntegrationTest.java
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataIntegrationTest_Roo_Configurable.aj
# ../../../../../../../../../src2/src/test/java/com/company/eorder/server/domain/RequisitionFormDataIntegrationTest_Roo_IntegrationTest.aj
# ../../../../../../../../../src2/target/
no changes added to commit (use "git add" and/or "git commit -a")
答案 0 :(得分:0)
您可以使用git checkout <file>
重置尚未暂存的文件更改。
如果分支之间存在歧义,请在文件名前添加--
。