Theodore Tso <tytso@xxxxxxx> writes: > So from a pedagogical perspective, what I would probably do is show > them how to replicate svn-up, and explain to them how this script > works: > > #!/bin/sh > # git-up > > if git diff --quiet && git diff --quiet --cached ; then > git pull $* > else > git stash ; git pull $*; git stash pop > fi Looks good, except: if git diff ....; then git pull "$@" else git stash && git pull "$@" && git stash pop fi to make sure the conflict notices won't be scrolled off by error messages from the later commands. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html