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 :: mac xterm download 
Shell :: github delete last commit 
Shell :: how to install julia on ubuntu 
Shell :: shell case example 
Shell :: is ubuntu debian 
Shell :: lower brightness of a ubunut pc 
Shell :: grant all the permission to the user ubuntu 
Shell :: unikey ubuntu 20.04 
Shell :: create a sudo user in centos 7 
Shell :: git clone using ssh key from gitlab 
Shell :: grep not 
Shell :: linux show alias function 
Shell :: how to install xdebug on Windows 
Shell :: install dvipng ubuntu 
Shell :: cloning a repository that says not found 
Shell :: ZSH Configuration File (.zshrc) 
Shell :: portainer ce install 
Shell :: where to find zshrc mac 
Shell :: git show list of stashes 
Shell :: install brew on raspberry pi 
Shell :: list groups of an user linux 
Shell :: execute command remotely by ssh 
Shell :: wsl2 file 
Shell :: certbot nginx certonly 
Shell :: install brew max 
Shell :: gcc alternatives 
Shell :: change ubuntu username 
Shell :: git checkout head 
Shell :: bash split line and get element 
Shell :: directory structure 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =