Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

delete all local branches git

$ git branch | grep -v "master" | xargs git branch -D 
Comment

delete all local branches git

git branch --merged | grep -v * | xargs git branch -D 
Comment

delete all local branches except current branch

git branch | grep -v "master" | grep -v ^* | xargs git branch -D
Comment

git branch delete all local branches

// hard delete

git branch -D $(git branch)
Comment

how to delete all branches in git local

git branch | grep -v "main" | xargs git branch -D
Comment

remove all branch local git

git branch | grep -v "develop" | grep -v "master" | xargs git branch -D
Comment

git delete all local branches starting with

git branch --list 'o*' | xargs -r git branch -d
Comment

Deleting all the git local branches

git branch --all-branches --merged --delete --ignore="fix-this-bug,prefix-*"
Comment

git delete all local branches

git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D
Comment

PREVIOUS NEXT
Code Example
Shell :: apt install slack 
Shell :: how to edit crontab in linux 
Shell :: bash sh: line [: too many arguments 
Shell :: git version 
Shell :: copy secret from one namespace to another 
Shell :: bash read multiple lines from user 
Shell :: composer uninstall dev require 
Shell :: dpkg install deb with dependencies 
Shell :: remote origin already exists. 
Shell :: ubuntu find file 
Shell :: ng command not found 
Shell :: dockerfile default workdir 
Shell :: git fetch not pulling branches 
Shell :: ts-node not found 
Shell :: how to install packages from github in flutter 
Shell :: public key generate 
Shell :: git clone with personal access token command line 
Shell :: git discard staged changes 
Shell :: git set head to commit 
Shell :: shell set environment variable 
Shell :: gcc install mac 
Shell :: ubuntu docker host ip 
Shell :: run bat file with arguments 
Shell :: linkedin pc download on ubuntu 
Shell :: kubectl cp command from pod to local 
Shell :: how to install snap store on kali linux 
Shell :: can I change a forked repo name 
Shell :: ubuntu search package 
Shell :: Ubuntu open terminal in current folder with shortcut 
Shell :: how to prevent ubuntu from sleeping when lid is closed 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =