Have you looked at the best practices whitepaper:
Ignition 8 Deployment Best Practices
The Scripting -> Project Library scripts end up in /data/projects//ignition/script-python//code.py
If you have set your repo at the projects level or the projects/ level then that folder (and code) should be included.
Scripts that are part of a view are embedded in the view.json
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpass"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button"
},
"position": {
"basis": "80px"
},
"scripts": {
"customMethods": [
{
"name": "newMethod",
"params": [],
"script": "\t# implement your method here\n\tpass"
}
],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "type-name-here",
"pageScope": true,
"script": "\t# implement your handler here\n\tpass",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.input.button"
}
Session scripts end up in data.bin. Despite the name it is human readable (and diffable) JSON.
Also, check out the Git Extension described here: Module Git - Easy integration of git for your development
It is really good.