我对当地几个档案做了改动,没有承诺<>。 www.un.org/Depts/DGACM/index_spanish.htm
>> git status
# On branch feature-ravendb
# Your branch is ahead of origin/feature-ravendb by 1 commit.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: source/Octopus.Tentacle/Integration/PowerShell/IPowerShell.cs
# modified: source/Octopus.Tentacle/Integration/PowerShell/PowerShellRunner.cs
#
no changes added to commit (use "git add" and/or "git commit -a")
我想放弃对这些档案的改动。 我按照指示进行了审判:
>> git checkout -- .sourceOctopus.TentacleIntegrationPowerShellIPowerShell.cs
指挥部没有产出。 现在,我又管理<代码>git status:
>> git status
# On branch feature-ravendb
# Your branch is ahead of origin/feature-ravendb by 1 commit.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: source/Octopus.Tentacle/Integration/PowerShell/IPowerShell.cs
# modified: source/Octopus.Tentacle/Integration/PowerShell/PowerShellRunner.c
#
no changes added to commit (use "git add" and/or "git commit -a")
Hmm, it s pretty convinced that the file has changed. And git diff <file>
seems to think that the whole file has changed, even though it hasn t:
diff --git a/source/Octopus.Tentacle/Integration/PowerShell/IPowerShell.cs b/source/Octo
--- a/source/Octopus.Tentacle/Integration/PowerShell/IPowerShell.cs
+++ b/source/Octopus.Tentacle/Integration/PowerShell/IPowerShell.cs
@@ -1,9 +1,9 @@
-<EF><BB><BF>using System;
-
-namespace Octopus.Tentacle.Integration.PowerShell
-{
- public interface IPowerShell
- {
- PowerShellExecutionResult Execute(PowerShellArguments arguments);
- }
+<EF><BB><BF>using System;
+
+namespace Octopus.Tentacle.Integration.PowerShell
+{
+ public interface IPowerShell
+ {
+ PowerShellExecutionResult Execute(PowerShellArguments arguments);
+ }
}
No newline at end of file
我怎么能说服我真的说,我真的没有改变档案,不想这样做?
www.un.org/Depts/DGACM/index_russian.htm
git checkout -- .
git checkout -f
git reset --soft
git reset --hard
Edit 2: Reverting back to an older revision, stashing my changes, then clearing the stash eventually worked. It seems like my line endings are conflicting but I don t know why:
- I have
core.autocrlf
set to true - I have a
.gitattributes
file with the line*.cs text
这是否足够?