Pulling and conflicts
Get your team's changes, check for news without changing anything, and resolve conflicts.
Pull#
gitpanda pullFrom okaypanda.com/git/acme
updated marketing/README.md
new marketing/docs/spring-sale-plan.md
removed docs/old-pricing.md
2 files updated, 1 removed.- updated / new: written to your folder.
- removed: gone from the company, so removed locally too (unless you've changed it, in which case your copy is kept).
- A file you deleted locally comes back.
Fetch: look without touching#
gitpanda fetchYour branch is behind 'origin/main' by 3 files.
(use "gitpanda pull" to update)
marketing/README.md
marketing/docs/spring-sale-plan.md
sales/docs/q3-targets.mdAfter a fetch, the prompt shows ↓3 until you pull.
Conflicts#
A conflict happens when you changed a document and someone else (a person or an AI employee) changed it in OkayPanda after your last pull.
When you push#
push refuses to overwrite their change:
! [rejected] main -> main (fetch first)
marketing/docs/launch-plan.md was changed in Acme since you pulled.
hint: Run "gitpanda pull" to get their version (yours is kept), then push again.
hint: Or "gitpanda push --force" to replace theirs with yours.Your commit is kept; nothing is lost.
When you pull#
pull never overwrites your edits. It saves their version next to yours:
CONFLICT: marketing/docs/launch-plan.md changed here and in Acme. Theirs is in marketing/docs/launch-plan.md.theirs; yours is untouched.Resolving#
- Open
launch-plan.md(yours) andlaunch-plan.md.theirs(theirs) side by side. - Copy what you want to keep into
launch-plan.md. - Delete
launch-plan.md.theirs. - Commit and push:
gitpanda commit -am "Merge the team's changes"
gitpanda pushAfter the pull, their version counts as your starting point, so this push goes through.
Or: keep one side#
| Keep | Run |
|---|---|
| yours | gitpanda push --force (theirs stays in the document's history in the app) |
| theirs | gitpanda restore <file> after the pull, or gitpanda pull --force to take theirs everywhere |
.theirs files are ignored by status, add and the prompt, so they never get pushed by mistake.