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 :: how to update ubuntu 
Shell :: allow localhose wsl2 
Shell :: linux get current user 
Shell :: ubuntu darling 
Shell :: arch linux 
Shell :: login to ssh with password 
Shell :: Error: .ini file does not include supervisorctl section 
Shell :: npm forever 
Shell :: kill process cmd 
Shell :: git blame before specific commit 
Shell :: github setup 
Shell :: linux create user 
Shell :: how to verify if pip installed a package 
Shell :: linux execute as user 
Shell :: how to install apple music ubuntu 
Shell :: bash print specific range of rows from a file 
Shell :: linux kustomize install 
Shell :: cargo add command not found 
Shell :: git remote url change 
Shell :: add router to vue 
Shell :: kill tensorboard process 
Shell :: how to allow traffic on port 8080 in centos 7 
Shell :: ubuntu delete directory and all files 
Shell :: sh declare variable 
Shell :: start chrome linux 
Shell :: how to force push heroku 
Shell :: check git settings terminal 
Shell :: workbench linux 
Shell :: fzf install 
Shell :: getting started with sanity 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =