Dumb down Github/Anvil usage

Okay so I haven’t really used git must before, and I know its something I really need to learn as a developer. I’ve had a browse through all of the documentation, both official and un-, and it seems kinda obtuse to me

Basically all I want to do is have a copy of my Anvil app on Github, with all changes in the Anvil IDE being pushed automatically to Github. I currently don’t do any anvil dev work locally, but that might change. Is there a simple step by step I should be following to allow this workflow to happen or is it going to be a fairly annoying process each time?

Main reason for doing this is that I have a bunch of code stored locally in different places (home PC, laptop, Colab, work PC), and the best way for me to consolidate currently is going to be on Github. Once I have it all there I can decide on a better workflow going forward
Would also be nice to track commits and stuff through Monday

Is that code all related to the app?

If yes, then you can clone the Anvil app repository to your computer, add a folder with your stuff, commit and push. At that point the depository in the Anvil server instead of a repository in github has your stuff.

See here for more details about this approach.

Nah its mostly a random assortment of stuff that’s either for early testing or for referencing. I’m mostly looking to keep my code, Anvil or otherwise, in one place, and want it to be accessible and updated no matter where I want want to work on it

That sounds to me like it’s about the app :slight_smile:

In my app repositories I have excel files with vba macros that use some http endpoint. Sometimes they are what the users will use in production, sometimes they are used once to upload data to the app database. They also include various scripts used in early testing, uplinks and anything that I may want to look at tomorrow, when cloning the app to a new computer.

Having a single place to look for all your miscellaneous files and projects, no matter where in the world you happen to be, or whose computer you’re using. With built-in history and version control. Nice idea. Seems to be a growing trend.

1 Like

I use my Anvil hosted account as the single source of truth for Anvil apps, and I back up all my projects to a VPS server using a cron script that runs GIT on the command line on that server. I also have a script on a local machine at my office that periodically backs up projects from the Anvil GIT server. Importantly, I also have scheduled tasks in my apps saving critical data tables as CVS files to my Google drive account (that just takes a few lines of code in each app).

All that is automated. I have Anvil App Server set up and ready to go on my VPS server, so if anything ever happens to Anvil’s hosting services down the road, it just takes just a few minutes to get a bunch of apps running immediately on the VPS.

2 Likes

I use github (or gitlab) as the source of truth for my apps with CI tasks to deploy to anvil whenever a merge to main occurs.

I also tend to have both local and anvil hosted copies of the app for dev and testing.

3 Likes