Tuesday Tip: Using Git with Google Apps Script
One of the biggest issues with Google Apps Script (GAS) is that it doesn’t have any real version control system. Last month I started using GitHub (through this course on Udacity) and was disappointed to discover that there is no way to directly integrate Git with GAS projects. If you’ve never used Git, it’s an awesome way to keep track of and merge code file versions. Without it, it can be extremely hard to try out new things or discover when bugs have been introduced. There’s a GAS ticket open for this lack of version control, so please star it if you agree that it’s a problem.
Fortunately, there’s a workaround. The Google Plugin for Eclipse
allows you to keep GAS projects on your local machine (and integrate with Git), while automatically syncing with the real project in the cloud.
On top of Git integration, using Eclipse with GAS is just a better way to write code. It’s a much cleaner interface and has a lot of tools that aren’t available in the GAS code editor.
I’ve been using this setup for about two weeks now, and so far, it works pretty well. However, there are a few things to be careful about:
Overall, I’ve enjoyed using the Google plugin for Eclipse. I’ve been using it on a remote freelance project for a nonprofit. I’ve enjoyed the security of knowing that I can try new things in GAS without (too much) fear of creating terrible bugs. At the same time, I’m looking forward to real Git integration with GAS.