Cleaning up old remote branches in Git
12 Oct 2016This time in fish.
git fetch origin --prune
git fetch --all
for branch in (git branch --remote | egrep -v 'develop|master|\*' | tr -d ' ' | sed 's/origin\///'); git push origin ":$branch"; end
This time in fish.
git fetch origin --prune
git fetch --all
for branch in (git branch --remote | egrep -v 'develop|master|\*' | tr -d ' ' | sed 's/origin\///'); git push origin ":$branch"; end
If you are using GNOME or similar desktop environment you might want sometimes delete default directories if you do not use them. Later on you figure out it would be cool to have them back, but when you create a new directory it does not have the good looking icon on it.
You can fix it with the below two commands which will regenerate the default directories.
rm ~/.config/user-dirs.dirs
xdg-user-dirs-update
Tired of checking file encodings?
cd $directory
for file in *; echo "$file — "(uchardet $file); end
uchardet