如何将此文件名指定为git?

时间:2015-08-03 15:06:30

标签: git special-characters

根据Git的说法,Å字母显然不是字母Å。 我如何使用此功能?

$ git config core.quotepath false

$ git status
On branch swift2
Your branch is ahead of 'origin/swift_2.0-tester' by 1 commit.
  (use "git push" to publish your local commits)
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    deleted:    Åka Strax.xcodeproj/project.pbxproj
    deleted:    Åka Strax.xcodeproj/project.xcworkspace/contents.xcworkspacedata
    deleted:    Åka StraxTests/A_ka_StraxTests.swift
    deleted:    Åka StraxTests/Info.plist

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)

    deleted:    Åka Strax.xcodeproj/project.pbxproj
    deleted:    Åka StraxTests/Info.plist
    deleted:    NärliggandeHållplatser.swift


$ git rm --cached "Åka StraxTests/Info.plist"
fatal: pathspec 'Åka StraxTests/Info.plist' did not match any files


$ git config core.quotePath true

$ git status
On branch swift2
Your branch is ahead of 'origin/swift_2.0-tester' by 1 commit.
  (use "git push" to publish your local commits)
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    deleted:    "\303\205ka Strax.xcodeproj/project.pbxproj"
    deleted:    "\303\205ka Strax.xcodeproj/project.xcworkspace/contents.xcworkspacedata"
    deleted:    "\303\205ka StraxTests/A_ka_StraxTests.swift"
    deleted:    "\303\205ka StraxTests/Info.plist"

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)

    deleted:    "A\314\212ka Strax.xcodeproj/project.pbxproj"
    deleted:    "A\314\212ka StraxTests/Info.plist"
    deleted:    "Na\314\210rliggandeHa\314\212llplatser.swift"

我可以在Å = \303\205时成功添加对索引的更改,但不能用于Å= A\314\212的文件名。我用来匹配任何其他字母的任何正则表达式都不会与其他文件匹配。

如何显式指定这些未暂存的更改的文件名?例如。我可以输入带有转义字符的文件名,就像git输出它们一样,如果没有:我怎么告诉git我指的是哪个文件?

我不知道是否或者为什么git希望我用某种特定的编码(?!)来输入内容,但这不是我通常输入的方式。

更新:OS X 10.10.4,bash,HFS +(坏消息?)

0 个答案:

没有答案