I am setting up a GitHub repository with the notebooks I created during my master's project. Among them, some are from Mathematica. Is there a better way to upload the files? Because the way I uploaded them, the code becomes quite confusing.

How it appears on GitHub: enter image description here

How the notebook looks: enter image description here

  • 2
    $\begingroup$ I thought the practice was to convert it to .m file (package file) and save that instead. Saving the raw notebook (even though it is plain text) might not be useful for diff's and looking at it. I remember now there was discussion on this before. May be in this forum or at community, $\endgroup$
    – Nasser
    Commented Aug 12, 2023 at 6:54
  • 1
    $\begingroup$ see for example how-to-put-mathematica-notebooks-and-packages-on-github $\endgroup$
    – Nasser
    Commented Aug 12, 2023 at 7:17
  • $\begingroup$ If you use github only for storing codes, I think you can merely ignore this issue. The codes you see on github are just the low level stuffs behind the notebook, see e.g. tutorial/ManipulatingNotebooks#31306. $\endgroup$
    – Lacia
    Commented Aug 14, 2023 at 13:01


Browse other questions tagged or ask your own question.