From http://www.darkcoding.net/software/cleaning-up-old-git-branches/
-
Switch to the main branch, usually 'develop':
git checkout develop
-
Get a list of fully merged branches:
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
From http://www.darkcoding.net/software/cleaning-up-old-git-branches/
Switch to the main branch, usually 'develop':
git checkout develop
Get a list of fully merged branches:
#!/bin/bash | |
# Takes one parameter: a remote git repository URL. | |
# | |
# This is the stuff this script does: | |
# | |
# 1. Clones the repository | |
# 2. Fetches all remote branches | |
# 3. Compresses the folder | |
# 4. Deletes the cloned folder. |