tapsboy
9/15/2017 - 3:25 PM

Git Commands

git filter-branch -f --tree-filter ‘rm -rf nodemodules' -- --all

git filter-branch -f --index-filter ‘git rm —cached —ignore-unmatch nodemodules' -- --all      

git filter-branch -f —prune-empty -- --all

git config --global rerere.enabled true

git add -p
Git Status of all repos:
     find . -maxdepth 1 -type d -exec sh -c '(cd {} && pwd && git status)' ';' 

Git Config for all repos:
     find . -maxdepth 1 -type d -exec sh -c '(cd {} && cat .git/config)' ';'

Git checkout branchname for all repos:
     find . -maxdepth 1 -type d -exec sh -c '(cd {} && pwd && git checkout branchname)' ';'
 
Git list branches alpha for all repos:
     find . -maxdepth 1 -type d -exec sh -c '(cd {} && pwd && git branch)' ';'