how do i delete a ghost trunk that doesn't show in...
# report-bugs
t
how do i delete a ghost trunk that doesn't show in my
gt config
?
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>
šŸ‘ 1
Hey Tyler, got your logs here and looking through them now
p
interesting šŸ¤” what is the status or expected status of your local? ie do you have stacks at the moment (even single branch ones)?
t
my local
main
is just normal, no changes. It's just when i...
Copy code
āÆ gt co main && gt get
Checked out main.
🌲 Fetching branches from remote...
ERROR: release is not a trunk.
suddenly
release
is mentioned.
release
is not used anymore nor is
release
stacked on top of
main
āŒ i have many branches stacked on
main
though. and maybe some old ones stacked on
release
from when we still used it. not sure how i'd identify
release
stacks given it's not a trunk anymore... i could delete
release
altogether, but 1) might lose out on debug data for yall, 2) not sure it'd solve the issue.
p
ah okay i was going to suggest junmping to the nuclear option
gt init --reset
if you had no local stacks but seems that is not at all the case
let me dig a bit more here quickly
šŸ‘ 1
and the state of ~/.config/graphite/user_config is what?
t
Copy code
{
  "authToken": "redactedxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
which is rather sparse compared to the other thread person's, but not really seeing anything
trunk
-y in theirs either so 🤷
šŸ‘ 1
p
yes, this are all settings you can enable in
gt config
though and i susppose wouldnt appear until you changed from the default
gtiConfigs is the VSC extension too, so unless you had that
t
well, i had a few trunks until recently - then i deleted the other trunks from graphite config (but not my local clone) at some point. not sure if it was before or after the
use_config
issue i had.
WRT VSC:
Copy code
āÆ grep -lir "graphite" .vscode
.vscode/extensions.json
but i don't use VSCode - that's for other team members. i do occasionally open it, don't know the last time.
p
anyway i dont think the config is whats causing this issue. So i think whats happening here is the stacks you have locally still poiniting to that old trunk are trying to sync since
gt get
from main is really
gt sync
as the docs note.
So i think you have 2 options here: 1) figure out what branches are / were pointing to
release
and delete them 2) add release back as a trunk to make number 1 easier to do
t
can do - good way to mass delete them? just one by one? or will deleting release prompt me to delete/re-home the rest? EDIT: It's only 9 of them, i can just manually do it. ^ food for thought if behavior is unhandled in gt tho i guess.
p
probably easiest way would be from the bottom most PR in the stack
gt delete -f --upstack
to delete entire stack at once
šŸ‘ 1
t
Copy code
āÆ gt delete -f --upstack
(then i selected
release
)
Copy code
ERROR: Cannot delete trunk!
Deleted them all (except
release
) manually, then removed the trunk via
gt config
Copy code
āÆ gt co main && gt get
Already on main.
🌲 Fetching branches from remote...
Running git fetch: [========================================] 100% | Done
ERROR: release is not a trunk.
lol. lemme try to delete
release
too...
Copy code
āÆ gt delete release
ERROR: Cannot perform this operation on untracked branch release.
You can track it by specifying its parent with gt track.
oookay then
Copy code
āÆ git branch -D release
Copy code
āÆ gt co main && gt get
Already on main.
🌲 Fetching branches from remote...
ERROR: release is not a trunk.
lol. not sure what it wants from me now.
If helpful, another log submitted:
Copy code
āÆ gt feedback --with-debug-context "just sending you more information about this one in case an additional round of logs helps <https://graphite-community.slack.com/archives/C02DRNRA9RA/p1772655410623889>"
Uploading log files: [========================================] 100% | Upload complete
Feedback received loud and clear 😊
p
yes yo ucant delete everything upstack of a trunk in one swoop, sorry should have been specific about that šŸ˜…
but okay, so you deleted all things pointing to release and then removed release as trunk
got the logs let me check what is happening now
okay im not seeing anything in the logs other than a validation we are still including
release
in the fetch. Next idea - can you try dumping the return from
gt state
into a json file and sendign it over?
t
sent via email per your DM šŸ’Œ
šŸ‘ 1
p
okay i think i found it PR #3462 (uppy-preserve-sw — "šŸ”§ Use SW to re/store uppy files >5mb (GEN-3148)") has "cliTrunk": "release" in the server API response for some reason. Looks fine in your local and fine in our UI but somehow maybe when it was submittedit was release and then got pointed to mainn on the rebase after its parent mertged šŸ¤” I think you could first try
Copy code
gt checkout uppy-preserve-sw

gt submit
t
i opted for
gt untrack
instead of
gt submit
but āœ… finally not seeing the
release is not a trunk
šŸŽ‰ thank you, brett šŸ™‚ this wasn't really impacting my work other than being like
but y tho?
, but hoping maybe the debug info was still helpful for yall to warrant the attention.
šŸ‘ 1