Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24371638
D3969.id10284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3969.id10284.diff
View Options
diff --git a/docs/workflow.md b/docs/workflow.md
new file mode 100644
--- /dev/null
+++ b/docs/workflow.md
@@ -0,0 +1,44 @@
+# Git + Arc Workflow
+
+## Normal flow
+
+```bash
+git checkout -b my-branch
+# make changes
+git add -A
+arc diff --nolint # creates/updates a Phabricator revision
+# after review is accepted:
+arc land --onto main
+```
+
+## Common commands
+
+| Action | Command |
+|--------|---------|
+| Create/update revision | `arc diff --nolint` |
+| Land after acceptance | `arc land --onto main` |
+| Update existing revision | make changes → `git add -A` → `arc diff --nolint` |
+| Amend commit message | `arc diff --edit --nolint` |
+
+## Mistakes & fixes
+
+**Accidentally ran `git commit` + `git push` instead of `arc diff`:**
+```bash
+arc diff main --nolint # create revision from existing commit
+```
+
+**`arc land` says "unknown revision":**
+```bash
+arc diff main --nolint # link commit to a revision first
+arc land --onto main
+```
+
+**`arc diff` says "no changes found":**
+```bash
+arc diff main --nolint # specify base branch explicitly
+```
+
+**Force land a specific revision:**
+```bash
+arc land --onto main --revision D1234
+```
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 08:16 (10 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3454796
Default Alt Text
D3969.id10284.diff (1 KB)
Attached To
Mode
D3969: Add Git + Arc workflow cheatsheet
Attached
Detach File
Event Timeline
Log In to Comment