Skip to content
doronshai edited this page Nov 27, 2018 · 3 revisions

git hooks

http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

Delete multiple branches

git branch -r | awk -F/ '//S_T_R_I_N_G/{print $2}' | xargs -I {} git push origin :{}

Remove files from status changes if they in gitignore already:

for i in git status | grep delete | awk '{ print $2}'; do git update-index --assume-unchanged $i; done;