So I'm probably hitting an edge case, but I change...
# report-bugs
p
So I'm probably hitting an edge case, but I changed my remote's fetch settings.
Copy code
git config --unset-all remote.origin.fetch
git config --add remote.origin.fetch '+refs/heads/main:refs/remotes/origin/main'
git config --add remote.origin.fetch '+refs/heads/mez/*:refs/remotes/origin/mez/*'
The motivation for this is simple - we have a bunch of engineers all using graphite so they all push their branches on `gt sync`s. It's hard to see what the state of the repo is when we have 15+ branches and I use
git log --graph --oneline --decorate --all
. We prefix our branches with our own user names, so it's easy to filter to just my own branches by using my personal prefix (mez). This seems to break gt sync though. I can work around it by using force, but obviously that can do other things. This shouldn't require force.
Copy code
» gt sub
Running in non-interactive mode. Inline prompts to fill PR fields will be skipped and new PRs will be created in draft mode.

🥞 Validating that this Graphite stack is ready to submit...

✏️ Preparing to submit PRs for the following branches...
▸ mez/fctl/enable-D417 (New parent)

🚀 Pushing branches to remote...
ERROR: Force-with-lease push failed due to external changes to the remote branch.
If you are collaborating on this stack, try gt get to pull in changes.
Alternatively, use the --force option of gt submit to bypass the stale info warning.

» gt sub --force
Running in non-interactive mode. Inline prompts to fill PR fields will be skipped and new PRs will be created in draft mode.

🥞 Validating that this Graphite stack is ready to submit...

✏️ Preparing to submit PRs for the following branches...
▸ mez/fctl/enable-D417 (New parent)

🚀 Pushing branches to remote...
Running git push: [========================================] 100% | Done

📨 Creating/updating PRs...
mez/fctl/enable-D417: <https://app.graphite.com/github/pr/foundrytechnologies/foundry/9899> (updated)
(sub is simple btw)
Copy code
sub submit --no-interactive
I've also confirmed that this problem goes away when I reset the fetch 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>
thanks for the detailed explanation here Prasanth. Will file a bug ticket for the CLI team though im curious your goal is to have a cleaner
git log
(ie only main + the mez/* branches) like
git log --graph --oneline --decorate main origin/mez/*
?
p
Yes, more or less. I didn't want to see my team's in progress branches since they aren't really relevant to my work day to day. We work in a single monorepo, so it gets quite noisy
p
got it! wondering if
gt log
or
gt log --short
might help here logging only your local branches tracked by graphite?
p
No, I use
gt ls
, but sometimes you need to drop lower. As an example, you get a production outage and you're digging through past commits to see why the production binary is failing. Graphite doesn't help here. I'm looking at all tags and maybe main.
👍 1