Created
July 25, 2015 15:02
-
-
Save oxyc/ffd0d3600c8535d98ba6 to your computer and use it in GitHub Desktop.
add drupal module updates as separate git commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oneliner | |
for m in $(git status -s . | cut -c 4- | cut -d'/' -f1 | sort -u); do git status -s $m; read -p "Are you sure you want to add it? [y/N]" -n 1 -r; echo; if [[ $REPLY =~ ^[Yy]$ ]]; then git add -A "$m"; git commit -m "${m}: updated module"; fi; done | |
for module in $(git status -s . | cut -c 4- | cut -d'/' -f1 | sort -u); do | |
git status -s $module | |
read -p "Are you sure you want to add it? [y/N]" -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
git add -A "$module" | |
git commit -m "${module}: updated module" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment