The GOCD plugins YAML and JSON Configuration Plugins provide a way to save GOCD pipeline configuration in the source code repository. GOCD poller checks the source code repository periodically for updates and updates the pipelines with the latest changes. More information can be found here.
Advantages
Version control support. Pipeline configuration only editable via source code. So, no accidental changes in pipeline. Easy to deploy and recovery.
Helpful links
https://www.gocd.org/pipelines-as-code.html
https://www.gocd.org/2017/05/02/what-does-pipelines-as-code-really-mean/