diff --git a/src/components/git-sync/steps/ForcePullDialog.tsx b/src/components/git-sync/steps/ForcePullDialog.tsx index 608e5c0f..5a71ae35 100644 --- a/src/components/git-sync/steps/ForcePullDialog.tsx +++ b/src/components/git-sync/steps/ForcePullDialog.tsx @@ -14,9 +14,15 @@ interface ForcePullDialogProps { open: boolean; onOpenChange: (open: boolean) => void; onConfirm: () => void; + remoteName?: string; } -export function ForcePullDialog({ open, onOpenChange, onConfirm }: ForcePullDialogProps) { +export function ForcePullDialog({ + open, + onOpenChange, + onConfirm, + remoteName = 'the remote' +}: ForcePullDialogProps) { const handleConfirm = () => { onOpenChange(false); onConfirm(); @@ -32,17 +38,14 @@ export function ForcePullDialog({ open, onOpenChange, onConfirm }: ForcePullDial

- This will permanently discard all local changes and reset your repository to match the remote. -

-

- This action cannot be undone. Any uncommitted work will be lost. + This will completely reset your local repository to match the repository pushed to {remoteName}, permanently deleting all local commits and changes that don't exist on {remoteName}.

-

What will happen:

+

What will be deleted:

diff --git a/src/components/git-sync/steps/SyncStep.tsx b/src/components/git-sync/steps/SyncStep.tsx index 9d967dcc..cdf4f79d 100644 --- a/src/components/git-sync/steps/SyncStep.tsx +++ b/src/components/git-sync/steps/SyncStep.tsx @@ -224,10 +224,11 @@ export function SyncStep({ projectId }: StepProps) { }; } - // Fallback to generic Git - return { - name: url?.hostname || 'Git', - }; + if (url && (url.protocol === 'http:' || url.protocol === 'https:')) { + return { name: url.hostname }; + } + + return { name: 'Git' }; }, [originRemote, matchedCredential]); const providerInfo = getProviderInfo(); @@ -370,6 +371,7 @@ export function SyncStep({ projectId }: StepProps) { open={showForcePullDialog} onOpenChange={setShowForcePullDialog} onConfirm={handleForcePull} + remoteName={providerInfo?.name} /> );