Editing and pushing
The everyday workflow: edit documents, review your changes, commit them with a message, and push them back.
It works like git: edit → add → commit → push. Or do it all at once with sync.
1. Pull first#
Your AI team writes all the time, so start from the latest:
gitpanda pull2. Edit#
Use any editor. You can change any document under docs/ or a room's docs/ folder, or add new
ones there.
code marketing/docs/launch-plan.md3. See what changed#
gitpanda status🐼 On branch main of Acme okaypanda.com/git/acme
Your branch is up to date with 'origin/main' (as of your last pull).
Changes not staged for commit:
(use "gitpanda add <file>..." to stage, "gitpanda restore <file>..." to discard)
modified: marketing/docs/launch-plan.md
New documents:
(use "gitpanda add <file>..." to include them)
marketing/docs/brand-voice.md
Not sent (read only):
marketing/README.md written by your team from real workgitpanda diff # line by line
gitpanda diff marketing/ # one folder or file4. Stage#
gitpanda add marketing/docs/launch-plan.md
gitpanda add marketing/ # everything changed in a folder
gitpanda add . # everything you can send
gitpanda diff --staged # review what's stagedRead-only files are skipped with a note, so add . is always safe.
5. Commit#
gitpanda commit -m "Lead with the price"[main 4dcb783] Lead with the price
2 files changed, 1 new
(use "gitpanda push" to send it to Acme)Write messages for your team: they appear in the company's history in place of "Update …". Leave out
-m and the AI writes one from your changes (see AI commit messages).
commit -am "…" stages every changed document first (new files still need add, as in git).
Optional: an AI review#
gitpanda reviewChecks your changes against the company's other documents for contradictions, wrong-looking numbers,
missing information and unclear writing. Or review as you push: gitpanda push --review. See
Review before you push.
6. Push#
gitpanda pushTo okaypanda.com/git/acme
4dcb783 Lead with the price
main -> main (2 files)Each document gets a new version in OkayPanda with your message. If you made several commits, they're pushed in order.
All at once: sync#
gitpanda sync -m "Lead with the price"sync stages everything you can send (including new documents), commits with your message, pulls,
and pushes. Without -m it writes a message from the files' names. It's the easiest way to save your
work.
New documents#
Create a Markdown file in docs/ (company-wide) or <room>/docs/ (for that room):
cat > marketing/docs/brand-voice.md <<'MD'
# Brand voice
Warm, short, a little cheeky.
MD
gitpanda sync -m "Add our brand voice"The first # Heading becomes the document's title. Files anywhere else (say marketing/notes.md)
can't be pushed; move them into a docs/ folder.
Renaming and deleting#
- Rename a document by changing its first
# Headingand pushing. After your nextpull, the file has its new name. - Deleting a file locally isn't sent: GitPanda never deletes your company's documents from the
terminal.
gitpanda pullbrings it back. To remove a document, delete it in the app.
Undoing#
| To… | Run |
|---|---|
| throw away your edits to a file | gitpanda restore <file> |
| unstage a file (keep the edits) | gitpanda reset <file> or gitpanda restore --staged <file> |
| unstage everything | gitpanda reset |
| see what you're about to push | gitpanda log --oneline (unpushed commits are at the top) |
A commit that isn't pushed yet stays on your computer only. Once pushed, every earlier version is still in the document's history in the app, so you can always go back.