This is the right way
Not making copy/fork from GitHub.
And as usual there is but. For me anyway — if WordPress world is familiar the question is very much same as there should one use functions.php for theme dependent changes, something like code snippets when change is not theme dependent or child theme if must edit theme or plugin; and if child theme is in use one will loose updates of that part.