我有一个项目,我必须chmod在开发过程中将文件模式更改为777,但不应在主回购中更改.
Git选择chmod -R 777 .并将所有文件标记为已更改.有没有办法让Git忽略对文件进行的模式更改?
标题说明了一切.
之后git reset --hard,git status给我Changes not staged for commit:部分内的文件.
我也尝试了git reset .,git checkout -- .并且git checkout-index -f -a无济于事.
那么,我怎样才能摆脱那些未分阶段的变化呢?
这似乎只打击Visual Studio项目文件.奇怪的.请参阅此粘贴:http://pastebin.com/eFZwPn9Z.这些文件的特殊之处在于.gitattributes我有:
*.sln        eol=crlf
*.vcproj     eol=crlf
*.vcxproj*   eol=crlf
此外,autocrlf在我的全局中设置为false .gitconfig.这可能是某种相关的吗?
我想删除对我的工作副本的所有更改.
运行git status显示修改的文件.
我没做什么似乎删除了这些修改.
例如:
rbellamy@PROMETHEUS /d/Development/rhino-etl (master)
$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   Rhino.Etl.Core/Enumerables/CachingEnumerable.cs
#       modified:   Rhino.Etl.Core/Pipelines/SingleThreadedPipelineExecuter.cs
#       modified:   Rhino.Etl.Tests/Rhino.Etl.Tests.csproj
#       modified:   Rhino.Etl.Tests/SingleThreadedPipelineExecuterTest.cs
#
no changes added to commit (use "git add" and/or "git commit -a")
rbellamy@PROMETHEUS /d/Development/rhino-etl (master)
$ git checkout -- Rhino.Etl.Core/Enumerables/CachingEnumerable.cs
rbellamy@PROMETHEUS …我遇到了无法将文件添加到存储库的问题.
我在Windows上使用GIT,在Aptana Studio中进行一些Ruby开发.
我已经设法将一些文件推送到GitHub,但在此之后,一切都停止了.我的主目录中有一个新的子文件夹,里面有2个ruby文件.如果我调用"git add.",然后"git status",它会一直说"工作目录清理"并且没有任何提交.
我试过"git add folder/myfile.rb"但仍然没有.
有人知道我能尝试什么吗?
我有一个修改过的文件,我想对最新提交中的任何内容进行反复处理,但是它"卡住",总是被标记为已修改.
$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   index.php
#
no changes added to commit (use "git add" and/or "git commit -a")
然后我尝试:
$git checkout -- index.php
但是git状态的输出仍然是相同的.然后我尝试:
$git reset --hard master
HEAD is now at 02c9613 test commit message
并且git状态的输出仍然是相同的.
关于如何摆脱该文件假设的变化的任何想法?
git ×6
git-reset ×2
chmod ×1
git-checkout ×1
git-status ×1
ignore ×1
revert ×1
working-copy ×1