I used to see this pop up more often (many months ...
# report-bugs
j
I used to see this pop up more often (many months ago). I haven't had the problem in several months now, but working on a stack with a coworker, I have a local change I'm trying to submit but graphite says there's a remote change. But when I try to
gt get
or
gt sync
to resolve, nothing is resolved, my local change is not pushed, stuck in circle 2 questions I guess: β€’ how can I avoid getting into this state (understand the remote changes thing will happen, but this endless loop / circle is what I'd like to avoid, curious if there's some specific process/flow that's causing it?) β€’ more pressingly, what's the best safe path to resolve? I don't think the
--force
option is super risky in this case since coworker and I are working on different areas, but is that the best way forward?
Copy code
zsh: ~/code/my-project> gt submit --stack
πŸ₯ž Validating that this Graphite stack is ready to submit...

ERROR: Branch feature/my-feature has been updated remotely. Use gt get or gt sync to sync with remote before submitting (or use the --force flag to override this check).
zsh: ~/code/my-project> gt get
🌲 Fetching branches from remote...
Running git fetch: [========================================] 100% | Done
main is up to date.

πŸ”„ Syncing branches...
Branch feature/my-feature is up to date with remote (PR #4846 v29).

πŸ₯ž Restacking branches...
feature/my-feature does not need to be restacked on main.

Already on feature/my-feature.
zsh: ~/code/my-project> gt submit --stack
πŸ₯ž Validating that this Graphite stack is ready to submit...

ERROR: Branch feature/my-feature has been updated remotely. Use gt get or gt sync to sync with remote before submitting (or use the --force flag to override this check).
EDIT: Just submitted CLI feedback named
jon-stelly-bug-report
. Let me know if you need more info, not sure if the cli debug log is enough
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
b
not from graphite team here, but just another user not sure about gt commands themselves, but in terms of safety, you always have reflog, however i notice that graphite creates a lot of logs there so it’s always not ideal, but will always have it. You can also always record the commit before doing a potentially destructive action. Both graphite and GH should have historic records of old commits too.
πŸ‘ 1
p
hey Jon, just confirming we in Graphite support received your debug logs and will revert in this thread πŸ‘
j
I was able to get this specific case resolved. I went to a second computer and did a
gt sync
which pulled in some changes from main, then submitted the stack. Then when I went back to my main computer where I was having this issue,
gt get
found and merged the new changes with my local changes. I was then able to submit the stack from that computer with the changes. So it feels like the problem on my main computer was like the gt get/sync commands weren't seeing the remote changes until they got bumped/incremented, but gt submit stack was. I wouldn't think this would have anything to do with time but just to mention it, my coworker who I'm collaborating on this stack with is in a different time-zone. Anyway, no time pressure to resolve this now but I would be curious if there are any findings of what exactly happened here, if there's some behavior/pattern I'm doing that gets us into this state. Thanks