I looked at my local `.git/config` and noticed tha...
# report-bugs
b
I looked at my local
.git/config
and noticed that it was over 1700 lines long. There were some lines that were repeated over and over within the same section. Example:
Copy code
[branch "main"]
	remote = origin
	merge = refs/heads/main
	vscode-merge-base = origin/main
	github-pr-owner-number = "my-org#my-repo#1843"
	github-pr-owner-number = "my-org#my-repo#1843"
	github-pr-owner-number = "my-org#my-repo#1843"
	github-pr-owner-number = "my-org#my-repo#1843"
	github-pr-owner-number = "my-org#my-repo#1843"
^ That last line was repeated over a thousand times. It was tied to a branch that had branch protection rules, which is likely related to this issue. There were a few other PRs behaving weirdly too.
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
It was also formerly one of the trunk branches.
I’ve since nuked that branch, but it keeps coming back. New line entries of that keep appearing every so often.
j
can you run the following command in your cli,
gt feedback -d cli-logs-for-josie
-- which branch keeps coming back?
b
Done. I had already erased local branches other than main and gotten rid of references to that PR prior to uploading feedback here. But there were 2 entries of
github-pr-owner-number = "zoya-finance#zoya-app#1843"
in my .git/config.
I did rename this repo just today, but this problem has been around before the rename.
And a bit more context, @Jocelyn Beaudoin: • We previously had
app-migration
as our default branch and trunk branch. • We eventually created a new branch called
main
and marked it as a trunk branch. • We created PR 1843 a while back that merged
main
into
app-migration
. This PR erased all code in the repo. We then followed up with new commits building on top of the emptied out repository (that still had past history).
Both trunk branches previously had branch protection rules too. I’ve since removed the branch protection rule and deleted the app-migration branch.
So this seems to be the cause, I think. There’s a closed PR that merges from main to app-migration. main is our sole trunk branch now, but there is a PR that used it as a base branch.
Is there something we can do here to prevent this from proliferating further?
j
can you run
gt config
to access
Repository-level settings
>
Remote repository
>
Configure repo name
and update the repository name to match the new repository name. going to analyze the logs in a bit here
a follow up question for you: was the GitHub Pull Requests integration in VS Code/Cursor enabled at the times when the duplicates reappeared?