This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
software:svnsyncgit [2018/09/10 16:21] 127.0.0.1 external edit |
software:svnsyncgit [2021/05/14 22:23] solar |
||
---|---|---|---|
Line 60: | Line 60: | ||
< | < | ||
- | git svn fetch --authors-file = authors.txt | + | git svn fetch --authors-file=authors.txt |
</ | </ | ||
Line 183: | Line 183: | ||
git commit | git commit | ||
git svn dcommit | git svn dcommit | ||
+ | </ | ||
+ | |||
+ | ===== Re-Building ===== | ||
+ | |||
+ | If, for some reason, you lose that Git setup created above, you need to re-build it: | ||
+ | |||
+ | < | ||
+ | git clone git@github.com:/ | ||
+ | cd pdclib | ||
+ | git svn init -s svn:// | ||
+ | </ | ||
+ | |||
+ | Now you need to re-build the '' | ||
+ | |||
+ | < | ||
+ | commit 5950958ff57391789d9a164a56cd1ed87dedaa12 (HEAD -> master, origin/ | ||
+ | Merge: 02e56d5 ec5835f | ||
+ | Author: Martin Baute < | ||
+ | Date: Tue Feb 2 10:59:34 2021 +0100 | ||
+ | |||
+ | Merge branch ' | ||
+ | |||
+ | commit ec5835f129d8f9629d334657d4c31b40d6190724 | ||
+ | Author: solar < | ||
+ | Date: Mon Feb 1 21:15:12 2021 +0000 | ||
+ | |||
+ | git-svn-id: https:// | ||
+ | ^^^ | ||
+ | </ | ||
+ | |||
+ | A bit easier is to have the computer extract the number for you: | ||
+ | |||
+ | < | ||
+ | REVISION=$(git log | grep git-svn-id | head -n1 | sed -e " | ||
+ | </ | ||
+ | |||
+ | Now fetch everything from your SVN repository //up to that revision//: | ||
+ | |||
+ | < | ||
+ | git svn fetch -r0: | ||
+ | </ | ||
+ | |||
+ | Set up the sync branch, and link it to the SVN remote: | ||
+ | |||
+ | < | ||
+ | git branch --no-track trunksvn | ||
+ | git checkout trunksvn | ||
+ | git reset --hard remotes/ | ||
+ | </ | ||
+ | |||
+ | Now rebase the branch //to what you already fetched//. The '' | ||
+ | |||
+ | < | ||
+ | git svn rebase --local | ||
+ | </ | ||
+ | |||
+ | Now we merge the sync branch to our master. This is basically a no-op, but it sets the merge point from which we will proceed. | ||
+ | |||
+ | < | ||
+ | git checkout master | ||
+ | git merge trunksvn --allow-unrelated-histories | ||
+ | </ | ||
+ | |||
+ | Now we are set up again, and can sync the SVN revisions we left out previously by the " | ||
+ | |||
+ | < | ||
+ | git checkout trunksvn | ||
+ | git svn rebase | ||
+ | git checkout master | ||
+ | git merge trunksvn | ||
+ | git push origin master | ||
</ | </ | ||