git – When should I use a patch?


One of the features of git is the use of patches. In what situations should a patch be used?

I read that patches were meant for hotfixes. However, I can't understand why I would make a patch instead of simply pushing the patch or pulling request.

Would it be the case that whoever fixed the bug has permission to clone the repository, but not have permission to push or pull requests?


Patches are used when you want to send a Git commit via e-mail, so much so that Git even has utilities to do so.

This has to do with the Linux kernel developers' practice of exchanging patches and discussing them via email and mailing lists. Some projects mimic this modus operandi. Personally, I prefer a Gerrit-like proofreading tool.

Scroll to Top