## git ### git file permission ignore `git config core.fileMode false` ### cheat sheet find and clean up repositories recursvely `find . -type d -name '.git' -prune -execdir bash -c "pwd; git reflog expire --all --expire=now; git gc --aggressive --prune=now" \;` ### gnome key store to change/activate git credential storing within the gnome key store: `git config --global credential.helper libsecret` ### merge editor `git config --global core.editor "vim"` ### get repo and all branches ``` ```bash git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done git fetch --all git pull --all ``` ### show diff against stack `git stash show -p` ### force submodule update `git submodule update --init --force --remote`