是否可以将格式化的补丁直接推送到远程服务器,甚至无需克隆存储库?
像这样的东西:
git push http://git:mr/android.git master 0001-patch.patch
最佳答案
您不能通过某种特定的“推送”在本地本地应用补丁。
您需要实现一个监听器来检测补丁并应用它(如 applying patches from emails ,在“Git Tip of the Week: Patches by Email ”中提到)。
但更一般地说,这并非易事,因为在应用补丁时可能必须解决潜在的冲突:这在本地克隆的存储库中更容易实现。
关于git 推送补丁到远程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29058785/