2

As an example, I have a directory with three files a lyx a latex and a bibtex file. Both the lyx and the latex share the bibtex file.

I'd like to share with my friends the directory (if possible everything but the lyx file).
I use overleaf to share latex documents. There I could upload the files directly via git push origin master. But, overleaf does not support lyx files, so it doesn't allow to push any file.

It would be nice if I could push only part of the directory, but it seems impossible. I thought I could make a branch with only the latex file, but often I have to use all the files at the same time, so it is not convenient this approach. I read that submodule can be an option, but, in that case, the bibtex file should be separated from the two files, I guess.

Do you have any other idea?

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
DdD
  • 572
  • 1
  • 5
  • 12
  • I don't understand much, but note that .lyx files are just plain text files. You could just change the extension from .lyx to .tex if that helps. I'm guessing you're on Windows? On Ubuntu the extension doesn't really mean much. – scottkosty Nov 20 '15 at 01:16
  • I'm sorry that I didn't explain well. So, the problem is just that overleaf refuses the upload of files with extensions different from tex bib and some pictures. I could rename the lyx file in tex, then it would be uploaded, but it is a bit to tricky as a solution. I'd rather prefer to keep the file extension coherent. – DdD Nov 20 '15 at 01:21
  • I see. Changing the extension might be the only way. Maybe contact Overfleaf's support. – scottkosty Nov 20 '15 at 03:23
  • Renate the lyx file to currentname_lyx.tex just for the sake of archiving and sharing it online. A symbolic link (and the answer below suggesting the .gitignore entry) should then set you up. – smoe Jul 10 '17 at 16:24

1 Answers1

1

Can you add the .lyx file to a .gitignore file? This will tell git to ignore the .lyx file when pushing to your repository, without you needing to take the lyx file out of the directory. When doing git push, you will upload just the latex and bibtex files.

satsumas
  • 85
  • 1
  • 3