Files
Advanced-Git/contents/patch-vs-diff-quick-reference.md
2025-07-11 03:26:51 +00:00

18 lines
588 B
Markdown

[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
[⬆️ Previous Step: Apply Diff File](./apply-diff-file.md)
# Patch vs Diff: Quick Reference
![Category: Patch & Diff](https://img.shields.io/badge/Category-Patch%20%26%20Diff-blue)
| Command | Use Case | Preserves Commit Info? | Can Apply With |
|---|---|---|---|
| git diff > file.diff | Share uncommitted changes | ❌ | git apply |
| git format-patch > file.patch | Share committed changes | ✅ | git am |
---
_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, diff, reference_