Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git clean branches

git checkout main
git branch -D $(git branch | grep -v 'main') # delete all local but main
git fetch # fetch from origin
git remote prune origin # delete non-existent remote branches
git pull # get to latest on main
Comment

clean local branches git

git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d
Comment

git clean local branches

git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
Comment

PREVIOUS NEXT
Code Example
Shell :: makefile parameter 
Shell :: clone all github repos 
Shell :: install zipalign kali linux 
Shell :: pull from upstream git 
Shell :: vim quit 
Shell :: tar extract command windows 
Shell :: install dpkg vscode 
Shell :: android/gradlew EACCES error 
Shell :: install docker desktop ubuntu 
Shell :: uninstall all pip packages 
Shell :: rebase branch github 
Shell :: how to setup path using git bash in windows 
Shell :: linux find md5 checksum 
Shell :: sed replace word with newline 
Shell :: delete file with cmd 
Shell :: wsl import 
Shell :: linux curl get request 
Shell :: .gitignore everything except 
Shell :: yarn install package 
Shell :: docker cmd multiple commands 
Shell :: install visual studio code ubuntu using command line 
Shell :: sngrep printed lines correctly 
Shell :: ubuntu cannot access settings 
Shell :: install ksd command 
Shell :: sed disable disallow root login 
Shell :: bash read full file 
Shell :: convert excel to csv command line linux 
Shell :: ubuntu history to file without line number 
Shell :: parallel downloading arch 
Shell :: laravel github clone error 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =