Skip to content

Commit 8481f8c

Browse files
authored
Document how to delete a remote branch (#672)
Signed-off-by: James Couball <jcouball@yahoo.com>
1 parent dce6816 commit 8481f8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ g.branch('new_branch').delete
286286
g.branch('existing_branch').checkout
287287
g.branch('master').contains?('existing_branch')
288288

289+
# delete remote branch
290+
g.push('origin', 'remote_branch_name', force: true, delete: true)
291+
289292
g.checkout('new_branch')
290293
g.checkout('new_branch', new_branch: true, start_point: 'master')
291294
g.checkout(g.branch('new_branch'))
@@ -339,6 +342,9 @@ g.repack
339342
g.push
340343
g.push(g.remote('name'))
341344

345+
# delete remote branch
346+
g.push('origin', 'remote_branch_name', force: true, delete: true)
347+
342348
g.worktree('/tmp/new_worktree').add
343349
g.worktree('/tmp/new_worktree', 'branch1').add
344350
g.worktree('/tmp/new_worktree').remove

0 commit comments

Comments
 (0)