У меня есть репозиторий git, который по какой-то причине показывает локальные изменения, которые я не могу вернуть. Из недавно клонированных репо я вижу один изменения файла конфигурации со следующим дифф от мерзавца диффПочему мои локальные изменения не удаляются с помощью сброса git?
C:\Projects\NewUI>git diff
diff --git a/EPFR.CountryFlows.Tests/app.config b/EPFR.CountryFlows.Tests/app.config
index d7256aa..7e1d79c 100644
--- a/EPFR.CountryFlows.Tests/app.config
+++ b/EPFR.CountryFlows.Tests/app.config
@@ -1,11 +1,17 @@
<U+FEFF><?xml version="1.0" encoding="utf-8"?>
<configuration>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
+ <parameters>
+ <parameter value="mssqllocaldb" />
+ </parameters>
+ </defaultConnectionFactory>
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ </providers>
+ </entityFramework>
</configuration>
\ No newline at end of file
когда я бегу git reset
или git checkout
, ничего не меняется. Если я run git reset --hard
я получаю следующие результаты
C:\Projects\NewUI>git diff
diff --git a/EPFR.CountryFlows.Tests/App.config b/EPFR.CountryFlows.Tests/App.config
index 7e1d79c..d7256aa 100644
--- a/EPFR.CountryFlows.Tests/App.config
+++ b/EPFR.CountryFlows.Tests/App.config
@@ -1,17 +1,11 @@
<U+FEFF><?xml version="1.0" encoding="utf-8"?>
<configuration>
- <configSections>
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
- </configSections>
- <entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
- <parameters>
- <parameter value="mssqllocaldb" />
- </parameters>
- </defaultConnectionFactory>
- <providers>
- <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
- </providers>
- </entityFramework>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
</configuration>
\ No newline at end of file
Какие, показывающие, что добавленные строки, и удаленные линии переключились. Запуск git reset --hard
приведет к тому, что эти два раздела кода будут переключаться между добавлением и удалением. Что я делаю неправильно?
Это после того, как свежий клон репозитория, и никаких других команд не было выполнено? – merlin2011