Customizing the Source Code

I'm tinkering with emonpi and have one connected in my garage and uploading to emoncms. I'd like to download the emonhub source, modify it locally and then update my emonpi build with the updated source files that I've modified. What's the best way to go about this? I'm modifying it for my particular use case and am doing it in a way where emoncms is not a part of the configuration. I just need to know how to update the emonpi with the modified source files. Thanks!