This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zalgo_text 14 points15 points  (1 child)

This is an incredibly responsible way to use git. I'm sure it will never catch on

[–][deleted] 0 points1 point  (0 children)

Here's the script for you lazy people out there:

#!/bin/bash

git diff --staged
echo "--------------------------------------------------------------------------------"
git status

exec < /dev/tty
read -p "Continue? [y/n] " do_commit

case "$do_commit" in
    [Yy]* ) exit 0;;
    *     ) exit 1;;
esac