Changes between Version 10 and Version 11 of TracTeam/Repositories
- Timestamp:
- Apr 7, 2015, 5:14:29 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTeam/Repositories
v10 v11 28 28 29 29 First you need to clone your repository (let's call the local repository `$user` as well): 30 {{{ 30 {{{#!sh 31 31 $ git clone http://svn.edgewall.org/git/trac/devs/$user $user 32 32 $ cd $user … … 34 34 35 35 After the clone, you'll see the following branches: 36 {{{ 36 {{{#!sh 37 37 $ git branch --all 38 38 * trunk … … 44 44 45 45 Speaking of which, we need to make it easy to retrieve the changes coming from upstream. For that, we add a remote that we will call `mirror`: 46 {{{ 46 {{{#!sh 47 47 $ git remote add mirror http://svn.edgewall.org/git/trac/mirror 48 48 $ git fetch mirror … … 51 51 52 52 If you'd like to get tags from the mirror, do like this: 53 {{{ 53 {{{#!sh 54 54 $ git fetch mirror 'refs/remotes/tags/*:refs/tags/*' 55 55 }}} 56 56 57 57 We also would like to fetch from this remote instead of the origin for the local branch `trunk`, so we need to replace `origin` by `mirror`: 58 {{{ 58 {{{#!sh 59 59 $ git branch --set-upstream-to=mirror/trunk trunk 60 60 Branch trunk set up to track remote branch trunk from mirror. … … 62 62 63 63 If you'd like to get a `0.12-stable` branch for tracking `mirror/0.12-stable`, simply do: 64 {{{ 64 {{{#!sh 65 65 $ git branch 0.12-stable mirror/0.12-stable 66 66 Branch 0.12-stable set up to track remote branch 0.12-stable from mirror. … … 68 68 69 69 Once this is done, for either of these, getting the changes from svn is a simple matter of going back to the branch in question and doing a pull, e.g. 70 {{{ 70 {{{#!sh 71 71 $ git checkout trunk 72 72 $ git pull --ff-only … … 76 76 77 77 For example: 78 {{{ 78 {{{#!sh 79 79 $ git checkout -b ticketXYZ/short-summary trunk 80 80 }}} 81 81 82 82 Whenever you want to publish such a topic branch, you push it to your repository. The push URL must use `https`, so be sure to do this once: 83 {{{ 83 {{{#!sh 84 84 $ git remote set-url origin --push https://$user@svn.edgewall.org/git/trac/devs/$user 85 85 }}} … … 87 87 88 88 Note that you can add the repositories from other developers in as many remotes as needed, e.g. 89 {{{ 89 {{{#!sh 90 90 $ git remote add cboos http://svn.edgewall.org/git/trac/devs/cboos 91 91 $ git remote add jomae http://svn.edgewall.org/git/trac/devs/jomae