Matt’s Tidbits #88 — Using patches

Matthew Groves
2 min readJan 26, 2021

--

Last time I wrote about how to download missing Android source files. This week, I have an interesting tidbit to share about Patch files.

I’ve been doing some highly collaborative programming this past week, and one of my teammates suggested I send a “patch” containing my changes, instead of creating a branch and pushing my changes up that way.

What is a patch? It’s a different way of sharing code changes which don’t require you to commit anything. Instead, you make any changes you want, and then Android Studio can create a specially-formatted diff that other people can import into their code.

If you’re doing highly experimental work and don’t want to pollute your VCS history, patch files might be just what you’re looking for! (It certainly is better than manually sending over which files have changed).

JetBrains has made them easy to use too — here are instructions for how to create a patch (and, importantly, how the other person imports it): https://www.jetbrains.com/help/idea/using-patches.html

Do you have a different way that you like to share changes with your colleagues? Let me know in the comments! And, please follow me on Medium if you’re interested in being notified of future tidbits.

This tidbit was discovered on January 22, 2021.

--

--