Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: exporting the last N days of a repository

From: Geoff Russell <hidden>
Date: 2016-06-15 22:45:36

Apologies to Johannes and Bob who have tried to help
but I'm still having difficulties, here is my current non-working script:

------------------------------------------------------------------
#!/bin/sh
DIR=/tmp/gitdemo
# for testing just arbitrarily
# select the 15th most recent commit as our new origin
NEWORIGIN=$(git rev-list master@{15} | head -1)
echo $NEWORIGIN
# checkout earlist point we are interested in
# we want to drop any history before this point
git checkout $NEWORIGIN
# now make a new directory, initialise with new origin
# and apply all commits after that point
mkdir $DIR && (cd $DIR ; git init) &&  \
    rsync -aHv --exclude=.git ./ $DIR && \
    (cd $DIR ; git add . ; git commit -m "starting point" </dev/null ) && \
    git fast-export $NEWORIGIN..master | (cd $DIR ; git fast-import )

----------------- end of script

The fast-import gives me a message I don't understand and doesn't
do the import.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help