相关疑难解决方法(0)

为什么git决定我的文件是二进制文件

我已将纯文本文件添加到存储库,git决定它是一个二进制文件.这是我的文件(链接)和github将其显示为纯文本文件.

但是,如果我尝试查看上次提交所做的更改,我会看到该消息

Binary file not shown 
Run Code Online (Sandbox Code Playgroud)

git

6
推荐指数
1
解决办法
1740
查看次数

Localizable.strings 的字符编码,由 genstrings 生成

在我的“ViewController.swift”中,我有一个本地化的字符串:

TheOutLabel.text = NSLocalizedString("hello", comment: "The \"hello\" word")
Run Code Online (Sandbox Code Playgroud)

在终端中,为了生成“Localizable.strings”文件,我输入:

cd Base.lproj/; genstrings ../*.swift; cat Localizable.strings
Run Code Online (Sandbox Code Playgroud)

并得到以下结果:

??/* The \"hello\" word */
"hello" = "hello";
Run Code Online (Sandbox Code Playgroud)

打字时od -c Localizable.strings,我得到:

0000000  377 376   /  \0   *  \0      \0   T  \0   h  \0   e  \0      \0
0000020    \  \0   "  \0   h  \0   e  \0   l  \0   l  \0   o  \0   \  \0
0000040    "  \0      \0   w  \0   o  \0   r  \0   d  \0      \0   *  \0
0000060    /  \0  \n …
Run Code Online (Sandbox Code Playgroud)

unicode character-encoding genstrings ios swift

5
推荐指数
1
解决办法
1319
查看次数

git gui - 可以显示UTF16吗?

有没有办法以某种方式git gui显示和显示UTF16文件的差异?

我找到了一些信息,但这主要是指命令行而不是gui.

git diff utf-16 git-gui

3
推荐指数
1
解决办法
1865
查看次数

git status 没有显示更新,但 pull 会降低更改

我在一个文件夹上运行了一个“git status”,它回答说:

$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Run Code Online (Sandbox Code Playgroud)

但是,运行 git log 未能显示我知道的最新更新:

* e2f5a0b (HEAD -> master, origin/master, origin/HEAD) First version of all
* f11f989 Initial commit
Run Code Online (Sandbox Code Playgroud)

所以我运行了 'git pull' 并关闭了所有更新:

* 057c274 (HEAD -> master, origin/master, origin/HEAD) update for ginger
* e2f5a0b First version of all
* f11f989 Initial commit
Run Code Online (Sandbox Code Playgroud)

我没能理解 git 的某些内容吗?是不是因为 Git 状态只适用于当前文件夹——我所有的更新都在一个子目录中?

请注意,我唯一能看到的,这可能只是一个红鲱鱼,是当我查看网络服务器(我正在使用 gitlab)时,我可以看到更新,但在尝试查看文件历史记录时,它告诉我所有已更改但未能显示差异的文件(我确实读过 diff 有 utf16 问题,但这不能解释这个错误?)

谢谢你的帮助。

[编辑]注意,当我查看历史记录时,它说“二进制文件不同”,但这些都是 .SQL 文本文件,仅由 …

git

0
推荐指数
1
解决办法
109
查看次数

标签 统计

git ×3

character-encoding ×1

diff ×1

genstrings ×1

git-gui ×1

ios ×1

swift ×1

unicode ×1

utf-16 ×1