From: Andrew Schein Date: Tue, 12 May 2009 16:24:56 GMT Subject: Re: git default behavior seems odd from a Unix command line point of view Message-ID: <4e963a650905120924j52d38c0dg577d93e913013e38@mail.gmail.com> In-Reply-To: <7vd4ae8fls.fsf@alter.siamese.dyndns.org> Hi Junio - Thanks for your reply giving historical context. The command line examples I gave were intended to give examples of the output rather than my own usage pattern. Here is my actual usage pattern... from a file called "sync.sh" (would love feedback on whether this is the gitly? way to solve my use case): # environment set up occurs before loop, I pull before "pushing" in an attempt to prevent # conflicts from being left on the shared repository. for dir in ./* ; do if [ ! -d $dir ] ; then continue ; fi #not a directory if [ ! -e $dir/.git ] ; then continue ; fi #not a git repo dir=`basename $dir` echo "syncing: $dir" set +e # commit returns an error if there is nothing to commit. (cd ./$dir ; git commit -a) set -e (cd ./$dir ; git pull $UP "$REPO/$dir" master) #pull ssh $HOST "mkdir -p $DEST_CACHE/$LOC/$dir" # these three lines handle "push" rsync -rl --delete ./$dir/.git -e ssh "$DEST:$DEST_CACHE/$LOC/$dir/.git" ssh $DEST "(cd $LOC/$dir ; /tools/bin/git pull $DEST_CACHE/$LOC/$dir/.git master)" done