| | 1 | = Creating a new library from an existing Git repository = |
| | 2 | [[PageOutline]] |
| | 3 | |
| | 4 | This page documents the procedure suggested by Daniel James for adding Rene Rivera's Predef library to Boost. |
| | 5 | |
| | 6 | Thanks to Daniel for supplying this procedure! |
| | 7 | |
| | 8 | == Procedure == |
| | 9 | |
| | 10 | A Boost Release Manager first sets up the {{{predef}}} repository in [https://github.com/boostorg boostorg on GitHub], and ensures that the library maintainer has push and pull access rights to it. |
| | 11 | |
| | 12 | {{{git@github.com:grafikrobot/boost-predef.git}}} is the exiting Git public repository used to develop the library. |
| | 13 | |
| | 14 | {{{ |
| | 15 | # Create clone containing both repos: |
| | 16 | git clone git@github.com:boostorg/predef.git |
| | 17 | cd predef |
| | 18 | git remote add grafik git@github.com:grafikrobot/boost-predef.git |
| | 19 | git fetch grafik |
| | 20 | |
| | 21 | # Save old branches, so old checkouts of the main module |
| | 22 | # will still work: |
| | 23 | git tag svn-develop origin/develop |
| | 24 | git tag svn-master origin/master |
| | 25 | git push --tags |
| | 26 | |
| | 27 | # Replace master, keeping some files from the old repo: |
| | 28 | # (-B overwrite the local branch) |
| | 29 | git checkout grafik/master -B master |
| | 30 | git checkout svn-master -- .gitattributes index.html |
| | 31 | git commit -m "Add files required for boost" |
| | 32 | git push --force origin master |
| | 33 | |
| | 34 | # Replace develop with master as well, |
| | 35 | # as grafik/predef doesn't have a develop branch |
| | 36 | git checkout -b develop |
| | 37 | git push --force origin develop |
| | 38 | }}} |
| | 39 | |
| | 40 | |