1

A program I use (TopSolid) saves it's settings in the top.cfg file. When I open the file with a text editor (notepad++ and notepad) I can see only text.

Sample:

A_COATING_NAME  ""
A_FINISHING_NAME    ""
A_MATTER_NAME   ##%Basis%Rompen%Rompen_1
D_CATALOG_ENABLE_EXCEL  0
D_COMPO_ACTIVATE_LEVELS_WHILE_INCLUSION 1
D_COMPO_APPLY_SERIAL_OP 0
D_COMPO_CHOOSE_INSERTION_SET    1
D_COMPO_FILTERED_STANDARD   TOPWOOD "Training Library"
D_COMPO_INCLUDE_PATH    ""
D_COMPO_LEVEL_ATTRIBUTE 2
D_COMPO_MODE_OPERATION  0
D_COMPO_PHYSICAL_ATTRIBUTES 2
D_COMPO_PUBLICATIONS_DISPLAY_MODE   1
D_COMPO_REPRES  2
D_COMPO_STANDARD    TSWH-Kitchen    $TOPGROUP\Libraries\TSWH-Kitchen    0
D_COMPO_STANDARD    TSWP-Deco   $TOPGROUP\Libraries\TSWP-Deco   0
D_COMPO_STANDARD    TSWP-Drawers    $TOPGROUP\Libraries\TSWP-Drawers    0

Since I'm experimenting I thought it wise to use git for revision control

upon git diff git maintains it is a binary file though:

index 7e0fa15..227b6e2 100644
Binary files a/top.cfg and b/top.cfg differ

Even if I open the file in notepad, copy everything, and paste it into a new .txt file

Why would this be the case? could there be a way to use git on this file like it was a text file?

EDIT: When I make a new text document and place the content of the top.cfg file in this file, git will recognise it as text. When I edit a setting in TopSolid (and TopSolid alters top.cfg) git sees it as being binary again.

Tried adding *.cfg text to .gitattributes. No effect

1 Answer 1

0

Redefine top.cfg as text file with .gitattributes

2
  • Answers should be self-contained and independent from external resources, as they can change or become unavailable in the future. Please incorporate relevant parts of the link into your answer.
    – gronostaj
    Sep 19, 2019 at 9:06
  • I tried *.cfg text in .gitattributes. No change.
    – quazoosl
    Sep 20, 2019 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .