What you are doing is not only writing the each line on a separate line, but also writing each line as a separate (implicitly created) score. Since they are in different scores they are not the same music expression and you need to write out the \relative for each of them.
> 7 okt. 2021 kl. 11:10 skrev Mahanidhi <mahani...@protonmail.com>: > > > Hello, > for storage reasons I prefer to write every single line of music on different > lines (see example: http://lilybin.com/cqud6p/1) I can't find a way to > incorporate the \relative c' command into a single block so as not to rewrite > it on every line of music. I tried with global= but it doesn't work. > > Thank you very much. > Mahanidhi >