Seems my git state is in bad shape and I'm getting...
# report-bugs
j
Seems my git state is in bad shape and I'm getting the below anytime I try to run
gt sync
Copy code
git rev-list --count [commit hash] --

fatal: Invalid revision range
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>
j
Sent logs using
gt feedback
p
Hey Jake, looking at a recent occurance of this same error, there's a couple troubleshooting steps to try out but unfortunately an init reset may be necessary: 1. Run
gt dev cache --clear
to clear any cached state that might be causing the issue. This is safe and won’t affect your Git or Graphite data. 2. Try untracking potentially problematic branches with
gt untrack
, then re-track them using
gt track
. You may need to manually rebase to ensure the correct parent branch. 3.
gt init --reset
as a last resort
j
Is there anyway to know which branch is problematic?
Think I found it using
--debug
but that branch isn't tracked on gt anymore
p
Hey Jake, checking back on this. Were you able to get back to a good state?
j
I found the branch but not entirely sure what to do from here given that untracking the branch doesn't work given that it's not being tracked in the first place. Would really love to avoid a
git init --reset
given that I'd lose all my branches tracked on graphite
p
why doesnt tracking the untracked branch work here? can you delete that local branch and re fetch from remote?
j
The untracked branch no longer existed but there was a tracked branch that was still referencing that branch somehow. That was leading to an error. Untracking that fixed it
p
awesome