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 :: remove last commit 
Shell :: create folder in terminal 
Shell :: copy folder linux command line 
Shell :: bash printf format 
Shell :: whereis alpine 
Shell :: linux change date and then change files ctime 
Shell :: applescript copy to clipboard 
Shell :: merge two branches from different repositories 
Shell :: add npm to $PATH ubuntu 
Shell :: update submodule 
Shell :: ubuntu port ping 
Shell :: can not ping github 
Shell :: ubuntu upgrade certbot acme v2 
Shell :: Conditional variables in gitlab-ci.yml 
Shell :: dart 
Shell :: list of installed packages and version 
Shell :: linux check ssh connections 
Shell :: git branch -r 
Shell :: grep binary files 
Shell :: cara install laravel 
Shell :: create new ssh key for github 
Shell :: how to enable gitlab runner to use local docker images 
Shell :: sbt install mac 
Shell :: cmd delete folder and all contents 
Shell :: fetch fork github 
Shell :: install v2ray 
Shell :: how to install jack client in ubuntu 
Shell :: socket install 
Shell :: octave ubuntu 20.04 
Shell :: how to push to heroku outside the master branch 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =