Importing your project: Difference between revisions
No edit summary |
m (cosmetics + categorization) |
||
Line 3: | Line 3: | ||
If you have a project you want us to [[Project hosting|host]] for you, including a source repository (and potentially any related webpages), this page is for you. You may have to fill out a successful [[Project hosting application|application]] to get started. |
If you have a project you want us to [[Project hosting|host]] for you, including a source repository (and potentially any related webpages), this page is for you. You may have to fill out a successful [[Project hosting application|application]] to get started. |
||
---- |
|||
== Importing your project into your OLPC-hosted repository == |
|||
At this time, we don't have the means to let developers create their own trees on the OLPC servers, so the following assumes you're using a central/shared tree for the project. |
At this time, we don't have the means to let developers create their own trees on the OLPC servers, so the following assumes you're using a central/shared tree for the project. |
||
Line 9: | Line 9: | ||
If you're using the one maintainer model, please ask us to create any other trees you need. We're working on adding the functionality to git-shell that will let you do this without our intervention in the future. |
If you're using the one maintainer model, please ask us to create any other trees you need. We're working on adding the functionality to git-shell that will let you do this without our intervention in the future. |
||
== Step 1. Install git == |
|||
First, you'll need to fetch and install git on your machine. The tarball with the latest version is always available at the [http://git.or.cz git site], and you might find your distribution provides packages. You can expect that the OLPC servers will always be running close to the latest version of the git tools. |
First, you'll need to fetch and install git on your machine. The tarball with the latest version is always available at the [http://git.or.cz git site], and you might find your distribution provides packages. You can expect that the OLPC servers will always be running close to the latest version of the git tools. |
||
== Step 2. Version your project locally == |
|||
If your project is already in a local git tree, you may skip this step. Otherwise, change into your project directory and initialize the tree: |
If your project is already in a local git tree, you may skip this step. Otherwise, change into your project directory and initialize the tree: |
||
Line 34: | Line 36: | ||
</pre> |
</pre> |
||
== Step 3. Pointing the tree at the OLPC server == |
|||
You now need to tell git that your pushes go to the OLPC system. |
You now need to tell git that your pushes go to the OLPC system. |
||
Line 59: | Line 61: | ||
</pre> |
</pre> |
||
== Step 4. Performing the initial push == |
|||
To do the initial push of your project to the OLPC server, run: |
To do the initial push of your project to the OLPC server, run: |
||
Line 66: | Line 69: | ||
</pre> |
</pre> |
||
== Step 5. Subsequent pushes == |
|||
For subsequent pushes, you don't generally need to use the --all parameter anymore, so |
For subsequent pushes, you don't generally need to use the --all parameter anymore, so |
||
Line 77: | Line 81: | ||
Note: Omitting --all will update all branches that are already present on the OLPC server. If you add new branches you will need to use --all again. |
Note: Omitting --all will update all branches that are already present on the OLPC server. If you add new branches you will need to use --all again. |
||
== Step 6. Checking out your tree == |
|||
To verify that everything works, attempt to clone your tree from the OLPC server within your /tmp directory: |
To verify that everything works, attempt to clone your tree from the OLPC server within your /tmp directory: |
||
<pre> |
<pre> |
||
Line 88: | Line 93: | ||
[[Category:Software development]] |
[[Category:Software development]] |
||
[[Category:HowTo]] |
Revision as of 05:03, 20 April 2007
If you have a project you want us to host for you, including a source repository (and potentially any related webpages), this page is for you. You may have to fill out a successful application to get started.
At this time, we don't have the means to let developers create their own trees on the OLPC servers, so the following assumes you're using a central/shared tree for the project.
If you're using the one maintainer model, please ask us to create any other trees you need. We're working on adding the functionality to git-shell that will let you do this without our intervention in the future.
Step 1. Install git
First, you'll need to fetch and install git on your machine. The tarball with the latest version is always available at the git site, and you might find your distribution provides packages. You can expect that the OLPC servers will always be running close to the latest version of the git tools.
Step 2. Version your project locally
If your project is already in a local git tree, you may skip this step. Otherwise, change into your project directory and initialize the tree:
$ cd MYPROJECT $ git init-db
Tell git who you are:
$ git repo-config user.name "FirstName LastName" $ git repo-config user.email "user@example.com"
Add your project files to git, and commit the initial tree:
$ git add . $ git commit -a -m 'Initial import'
Step 3. Pointing the tree at the OLPC server
You now need to tell git that your pushes go to the OLPC system.
Insert these two lines into .git/remotes/origin within your newly-versioned project tree:
URL: git+ssh://dev.laptop.org/git/projects/MYPROJECT Pull: refs/heads/master:refs/heads/origin
Obviously, replace MYPROJECT with the project name you requested.
If you're pushing a personal tree, use the line:
URL: git+ssh://dev.laptop.org/~/public_git/MYTREE
for the URL: line. If the user on your local machine and the dev.laptop.org server is different, make sure to modify the above lines for your dev.laptop.org user. I.E.:
URL: git+ssh://MYUSER@dev.laptop.org/git/projects/MYPROJECT
Step 4. Performing the initial push
To do the initial push of your project to the OLPC server, run:
$ git push --all
Step 5. Subsequent pushes
For subsequent pushes, you don't generally need to use the --all parameter anymore, so
$ git push
Will do the trick.
Note: Omitting --all will update all branches that are already present on the OLPC server. If you add new branches you will need to use --all again.
Step 6. Checking out your tree
To verify that everything works, attempt to clone your tree from the OLPC server within your /tmp directory:
$ cd /tmp $ git clone git://dev.laptop.org/projects/MYPROJECT $ ls MYPROJECT
That's it! Enjoy.