We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
origin
1 parent 64c5680 commit f5cb437Copy full SHA for f5cb437
git-prune-remote-branch
@@ -7,12 +7,12 @@ opts.parse!
7
8
`git branch -r`.each_line do |branch|
9
branch.strip!.chomp!
10
- next if branch =~ /origin\/master/
11
- next if branch =~ /origin\/develop/
+ next if branch =~ /[^\/]+\/master/
+ next if branch =~ /[^\/]+\/develop/
12
13
if `git branch --contains #{branch}`.each_line.any? { |included| included.strip.chomp =~ /\A(develop|master)\z/ }
14
- ref = branch.sub(/^origin\//, '')
15
- command = "git push --delete origin #{ref}"
+ ref = branch.sub(/^(?<remote>[^\/]+)\//, '')
+ command = "git push --delete #{$~[:remote]} #{ref}"
16
puts command
17
unless $noop
18
system command
0 commit comments