Line feed disappear between mac and windows ver.3

i create a project in mac, and i write a lot.

i buy a windows version to sync project.

when i open the project which sync by git, all of the line feed is disappeared in windows .
i already update scrivener both in mac and windows

I searched for “git” on this forum and found a number of previous conversations, not all being optimistic that it can be made (easily) to work with Scrivener. My hunch is that git did something to the files.

I would recommend:

  • doing the sync with Dropbox per instructions by Scrivener and see if it works ok. If yes, use it.
  • Unless there is a compelling reason to use both products on different operating systems, consider picking and using mac or windows only, if possible.

Git is not one of the supported sync mechanisms. A Scrivener project is made up of a number of files, some XML, some plaintext, and some RTF – and depending on Git’s settings, it may try to change CR/LF settings.

If you are going to use Git, you probably need to add extra steps to your workflow.

  1. Edit your project in Scrivener and save it.
  2. Turn the saved copy into a single binary file archive using ZIP or whatever other archiver you prefer, as long as you have the tools to compress/decompress in that format on all of your machines. (Note that you can configure the Scrivener backup settings to automatically produce a zipped backup file for you, with the name and timestamp in the filename.
  3. Use git to check-in the single binary file archive, not your live project. Because this is a binary file format and (assuming you use ZIP) Git should understand not to modify a ZIP file, this will preserve the formatting of the file.
  4. On your other machine, check out hte latest binary file archive. Decompress it to your working area.
  5. Edit the project on your other machine from the working area.

Repeat and rinse.

This take a couple of extra steps, but with a combination of the correct Scrivener configuration and a couple of simple workflow wrapper scripts, you could fairly easily automate this approach. It would achieve the goal of using Git, keep all your projects backups safely in your Git repository, and not require you to undergo complex reconfiguration on all your Git clients to ensure that Git is not messing with Scrivener project component files.

1 Like

i modify the auto crlf in the config in git, and it looks work well.

i write in both windows and mac, depend on the time where i am.
so the Incremental update is more import for me.

1 Like

Good luck. Just make sure you are a not in a situation where you are trying to merge two check-ins — let each check-in be applied to the repository, and loaded back down to the machine you are about to work on, or you will probably start running into issues that will lead to file corruption.