Yeah Git was explicitly designed for text storage, not binary. It would have been cool if the developers kept shader nodes, geometry nodes, or even compositor nodes as separate external XML or JSON files so a git diff would make it easy to understand changes. But currently and unfortunately there is no feasible way to do a version control of these types of changes as they are all embedded within the binary .blend file.
The problem with the first option (assuming that was even possible with python) is this: While we would need to do some testing around with geometry nodes until we find a working setup, we would then have to go through the pain & hassle to update the python generator and make sure it generates exactly that setup to keep everything in sync.
You would probably be better off with your second option. And always make sure to keep changes minimal and modularized (that is make changes to only one problem or bug at a time) whenever you make a git commit with proper comments (git commit -m command) so it's easier to trace back if something breaks.
You can also take a look at Perforce Helix Core for more efficient binary file version control.
On another thought if this was really even possible. Maybe there is a way to python script your way to "export" all the nodes (and their positions) after making your geometry nodes changes into a python script, which when executed generates the same exact setup. That would mean that you could continue working on your geometry nodes and whenever you're finished you need to click that button to generate the script and commit it then everytime someone wants to work on the setup they execute the script and continue working. But then you could run into the problem that someone else made a new change. So you would have to lock the file while editing.