admin管理员组文章数量:1289509
Is it possible to do git push --delete
a branch using a refname like refs/remotes/origin/feature_bananas
?
The usual way I remove branches remotely is using git push --delete origin feature_bananas
but in this case I'm getting the refname from git branch -r --list
so it would be easier if I could use refs/remotes/origin/feature_bananas
directly somehow.
Is it possible to do git push --delete
a branch using a refname like refs/remotes/origin/feature_bananas
?
The usual way I remove branches remotely is using git push --delete origin feature_bananas
but in this case I'm getting the refname from git branch -r --list
so it would be easier if I could use refs/remotes/origin/feature_bananas
directly somehow.
1 Answer
Reset to default 0You could do something like this beast:
git branch --list -v --remote --format="%(refname) %(author) %(committerdate)" \
| fzf -f"'Moberg bananas$" \
| cut -d\ -f 1 \
| awk -F/ '{print $3 " " $4 "/" $5 }' \
| xargs -L1 git push --delete
本文标签: git remove (push delete) a branch in remote using a refnameStack Overflow
版权声明:本文标题:git remove (push delete) a branch in remote using a refname - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741405333a2376910.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论