Documentation/Create SVN Project Mirror: Difference between revisions

From Commontk
Jump to navigationJump to search
(Created page with '* Setup the 'svn-mirror' branch <pre> mkir PythonQt cd PythonQt git init git svn init -T https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk/ --no-minimize-url git svn f…')
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Documentation|Back to CTK Documentation]]
* Setup the 'svn-mirror' branch
* Setup the 'svn-mirror' branch


Line 9: Line 11:
git gc
git gc
git remote add origin git@github.com:commontk/PythonQt.git
git remote add origin git@github.com:commontk/PythonQt.git
git push origin master:refs/heads/svn-mirror
git branch -M svn-mirror
git push origin svn-mirror:refs/heads/svn-mirror
</pre>
</pre>


*  .. and the 'patched' branch
*  .. and the 'patched' branch
Line 24: Line 26:
git push origin patched:refs/heads/patched
git push origin patched:refs/heads/patched
</pre>
</pre>


*  Rebase the 'svn-mirror' branch
*  Rebase the 'svn-mirror' branch
Line 33: Line 34:
</pre>
</pre>


<pre>
Before:
          A---B---C patched
        /
    D---E svn-mirror
</pre>
<pre>
After:
          A---B---C patched
        /
    D---E---F---G svn-mirror
</pre>
* Rebase 'patched' branch on top of 'svn-mirror' branch
<pre>
git rebase patched svn-mirror
</pre>
<pre>
Before:


* Merge 'svn-mirror' branch with the 'patched' one
          A---B---C patched
        /
    D---E---F---G svn-mirror
</pre>
 
<pre>
After:
                  A'---B'---C' patched
                /
    D---E---F---G svn-mirror
</pre>

Latest revision as of 15:28, 5 October 2011

Home < Documentation < Create SVN Project Mirror

Back to CTK Documentation

  • Setup the 'svn-mirror' branch
mkir PythonQt
cd PythonQt
git init
git svn init -T https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk/ --no-minimize-url
git svn fetch 
git gc
git remote add origin git@github.com:commontk/PythonQt.git
git branch -M svn-mirror
git push origin svn-mirror:refs/heads/svn-mirror
  • .. and the 'patched' branch
git checkout -b patched
  • hack, hack, hack
git push origin patched:refs/heads/patched
  • Rebase the 'svn-mirror' branch
git checkout svn-mirror
git svn rebase
Before:

          A---B---C patched
         /
    D---E svn-mirror
After:

          A---B---C patched
         /
    D---E---F---G svn-mirror
  • Rebase 'patched' branch on top of 'svn-mirror' branch
git rebase patched svn-mirror
Before:

          A---B---C patched
         /
    D---E---F---G svn-mirror
After:
                  A'---B'---C' patched
                 /
    D---E---F---G svn-mirror