Skip to content

Instantly share code, notes, and snippets.

@pestophagous
Last active November 24, 2019 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pestophagous/3df867663a16ae1e63550fb9787e10f3 to your computer and use it in GitHub Desktop.
Save pestophagous/3df867663a16ae1e63550fb9787e10f3 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "${BASH_SOURCE[0]}" -ef "$0" ]
then
echo "Hey, you should source this script, not execute it!"
exit 1
fi
reporoot=`git rev-parse --show-toplevel`
these=`git status --porcelain | grep '^UU' | awk '{printf("'${reporoot}'/%s\n", $2)}'`
git add $these
ec $these
git difftool --cached $these
# then in separate file
# git add -p $these
echo 'git add -p $these'
### pointless change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment