-
-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
[1] git branch --delete origin/dev-adi-macOS
error: branch 'origin/dev-adi-macOS' not found.
Did you forget --remote?
From the git log.
There are two possible ways to deal with this I imagine:
-
Conditionally add
--remotewhen the branch the user is requesting to delete is on one of the remotes
edamagit/src/commands/branchingCommands.ts
Lines 113 to 128 in 61b9afe
async function deleteBranch({ repository }: MenuState) { const ref = await MagitUtils.chooseRef(repository, 'Delete', false, false, false); if (ref) { try { await gitRun(repository.gitRepository, ['branch', '--delete', ref]); } catch (error: any) { if (error.gitErrorCode === GitErrorCodes.BranchNotFullyMerged) { if (await MagitUtils.confirmAction(`Delete unmerged branch ${ref}?`)) { return await gitRun(repository.gitRepository, ['branch', '--delete', '--force', ref]); } } } } } -
Add a new function in
remotecalled "Delete branch on remote"
Presumably, something like this followed by agit push origin --delete(along with other bookkeeping changes would already suffice).
develop...adisidev:edamagit:patch-1
@kahole if you are okay with either option, I am happy to try and implement whichever option is easier and send in a PR. Thanks for the lovely tool!
kahole
Metadata
Metadata
Assignees
Labels
No labels