GIT checkout shows files with wrong encoding

In the end, the question may be completely dumb, but ...

I have a local GIT repository on Win 7 running GIT on the Windows command line. All files are in UTF-8 (no BOM), texts contain non-ASCII characters (German, Russian, etc.), So send messages. At some point, I needed to recall some data from past commits, which are in non-ASCII characters. But both gitk and git checkout <commit-hash>

show files in non-UTF-8 encoding (default ANSI according to Notepad ++), of course breaking UTF-8 characters only. Reverting to HEAD restores the file encoding.

Am I missing something? GIT settings might need to be done. I am assuming the GIT files are not UTF-8 and therefore cannot have such characters.

I should also mention that the non-ASCII commit messages work fine ( git log

and gitk shows them correctly, although I haven't changed the cmd encoding).

Thank!


Edit: This is what my files look like in gitk or when checked out (note the symbols in the comment line):

@import 'reset';
@import 'mixins';
@import 'animations';
@import 'variables';
@import 'helpers';

/* ==================== Ђ„‚‹ ==================== */
@font-face{
    font-family:'ClearSans';
    src:url('../fonts/ClearSans-Medium.eot');
    src:url('../fonts/ClearSans-Medium.eot?#iefix') format('embedded-opentype'),
         url('../fonts/ClearSans-Medium.woff') format('woff'),
         url('../fonts/ClearSans-Medium.ttf') format('truetype'),
         url('../fonts/ClearSans-Medium.svg') format('svg');
    font-weight:normal;
    font-style:normal;
}

      

+3
git windows character-encoding


source to share


No one has answered this question yet

See similar questions:

581
What's the best strategy for managing CRLF (carriage return, line feed) with Git?

or similar:

20142
How do I undo the last local commits in Git?
15981
How do I delete a Git branch locally and remotely?
11347
What is the difference between 'git pull' and 'git fetch'?
8423
How do I undo 'git add' before committing?
7919
How do I rename my local Git branch?
7159
How do I revert my Git repository to a previous commit?
6484
How do I force "git pull" to overwrite local files?
6475
How to remove local (untracked) files from the current Git working tree
6334
How do I checkout a remote Git branch?
4491
How to discard unreported changes in Git?



All Articles
Loading...
X
Show
Funny
Dev
Pics