git-svn wowes
Hi,
I have a working git-svn clone of a svn based project.
At the mement I have a .sh script run every hour which goes :-
git svn fetch
git reset -- hard HEAD
git svn rebase
I am sure this is like using a hammer to crack a nut.
Is there a better way to do this ?
Many thanks in advance,
Aaron
Quoted 6 lines · Aaron Gray
Hi,
I have a working git-svn clone of a svn based project.
At the mement I have a .sh script run every hour which goes :-
Quoted 7 lines
git svn fetch
git reset -- hard HEAD
git svn rebaseI am sure this is like using a hammer to crack a nut.
Is there a better way to do this ?
Assuming you don't make your own local changes ever:
git svn fetch git reset --hard $ref
Where $ref is most likely "trunk" if you used -s/--stdlayout or "git-svn" if you did not. Running `git branch -r' will give you a list of remote refs that you can reset to.
Signature · 1 line
Eric Wong
Heya,
Quoted 1 line · Aaron Gray
git svn rebase
Should be enough ('git svn rebase' runs 'git svn fetch' first), assuming you don't touch the working directory, which you probably don't considering that your script blasts away all changes every hour.
Signature · 3 lines
Cheers, Sverre Rabbelier