diff --git a/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx b/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx index 82956f7835..4a73736103 100644 --- a/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx +++ b/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx @@ -14,11 +14,11 @@ export const GitRemoteBranchSelect = ({ isDisabled: boolean; credentials: GitCredentials; }) => { - const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: url || 'branch-select' }); + const uri = useDeferredValue(url); + const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: `branch-select:${uri}` }); const { organizationId } = useParams<{ organizationId: string }>(); const isLoadingRemoteBranches = remoteBranchesFetcher.state !== 'idle'; - const uri = useDeferredValue(url); useEffect(() => { if (uri && remoteBranchesFetcher.state === 'idle' && !remoteBranchesFetcher.data) {