Skip to content

Instantly share code, notes, and snippets.

@jmathai
Created April 20, 2010 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmathai/371828 to your computer and use it in GitHub Desktop.
Save jmathai/371828 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Ease staging of files
for i in $(git status | grep -A 10000 "not updated" | grep modified) ; do
if [ -f $i ] ; then
git diff $i;
echo -n "Add this to stage? [y/n]: ";
read ans;
if [ "$ans" == "y" ] ; then
git add $i;
echo "++++++ Added to stage ($i) ++++++";
fi;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment