Changes

Line 24: Line 24:     
Once you do this, Gitorious knows who you are and how to contact you.  You should only need to do this once.
 
Once you do this, Gitorious knows who you are and how to contact you.  You should only need to do this once.
 +
 +
You'll need to login to Gitorious whenever you want to do any of the actions described here.
      Line 43: Line 45:  
  -rw-r--r--  1 strom strom  603 2009-12-17 21:51 id_dsa.pub
 
  -rw-r--r--  1 strom strom  603 2009-12-17 21:51 id_dsa.pub
   −
You should only need to create a key once, unless you change to another system, or you think your private key was compromised.  If you do it again, you must also add the new key to Gitorious in the next section.
+
You should only need to create a key once, unless you change to another system, or you think your private key was compromised. (Note that "change to another system" includes each new Sugar-on-a-Stick USB drive.) If you do it again, you must also add the new key to Gitorious as described in the next section.
       
=== Add SSH Key ===
 
=== Add SSH Key ===
   −
Log in to http://git.sugarlabs.org/ click on ''Dashboard'', then ''Manage SSH'', then ''Add SSH key''.  The ''Add a new public SSH key'' page will appear, with a large text entry field.  Open your public key in a text editor or web browser, and then paste it into the text entry field.  Click on ''Save''.
+
Log in to http://git.sugarlabs.org/ click on ''Dashboard'', then ''Manage SSH'', then ''Add SSH key''.  The ''Add a new public SSH key'' page will appear, with a large text entry field.  Open your public key in a text editor or web browser (or display it with the cat command), and then paste it into the text entry field.  Click on ''Save''.
    
Once you do this, Gitorious trusts SSH connection from your system because your system has the private key, and Gitorious has the public key.  You should only need to do this once, unless you change to another system.
 
Once you do this, Gitorious trusts SSH connection from your system because your system has the private key, and Gitorious has the public key.  You should only need to do this once, unless you change to another system.
Line 54: Line 56:  
(With ssh-keygen you can specify the name of your key file. Using this feature is not a good idea, because we haven't tested it. Keys should generally be located in <tt>~/.ssh/id_rsa.pub</tt> or <tt>~/.ssh/id_dsa.pub</tt>.)
 
(With ssh-keygen you can specify the name of your key file. Using this feature is not a good idea, because we haven't tested it. Keys should generally be located in <tt>~/.ssh/id_rsa.pub</tt> or <tt>~/.ssh/id_dsa.pub</tt>.)
   −
ToDo: Does keys protected with a passphrase work together with GIT?
+
ToDo: Do keys protected with a passphrase work together with GIT?
    
ToDo: What is the difference between DSA and RSA keys?
 
ToDo: What is the difference between DSA and RSA keys?
Line 65: Line 67:  
Check that the activity is not already on git.sugarlabs.org.  If it is, note the clone URL and skip to the next section.  If it is not, then click the ''Create a new project'' link on the ''Projects'' page, and enter:
 
Check that the activity is not already on git.sugarlabs.org.  If it is, note the clone URL and skip to the next section.  If it is not, then click the ''Create a new project'' link on the ''Projects'' page, and enter:
 
*Title
 
*Title
*Slug (this defaults to a file name format of your title)
+
*Slug (this defaults to a file name format of your title; it consists of your title without caps, and with non-alphanumeric characters replaced by dashes)
*License
+
*License (this is the same as the one described at the beginning of your primary python file)
 
*Description
 
*Description
 
then click on ''Create project''.  There several other question which can be answered later as you have more information.
 
then click on ''Create project''.  There several other question which can be answered later as you have more information.
Line 78: Line 80:  
  git clone gitorious@git.sugarlabs.org:${SLUG}/mainline.git ${SLUG}.git
 
  git clone gitorious@git.sugarlabs.org:${SLUG}/mainline.git ${SLUG}.git
   −
Replace ''${SLUG}'' substring with your project slug value.
+
Replace the ''${SLUG}'' substring with your project slug value. Your local repository (folder) is now named <your-slug-name>.git
    
Once you do this, you will have a local repository that shares the same history of changes (if any) of the repository at Sugar Labs.  You should only need to do this once for each project and system.  You can do it again if you need a fresh copy that has no changes.
 
Once you do this, you will have a local repository that shares the same history of changes (if any) of the repository at Sugar Labs.  You should only need to do this once for each project and system.  You can do it again if you need a fresh copy that has no changes.
Line 96: Line 98:  
Otherwise, configure git in the repository:
 
Otherwise, configure git in the repository:
   −
  cd ${SLUG}
+
  cd <your-slug-name>.git
 
  git config user.email <email-you-used-for-registering-project>
 
  git config user.email <email-you-used-for-registering-project>
 
  git config user.name <your-name>
 
  git config user.name <your-name>
Line 105: Line 107:  
=== Develop ===
 
=== Develop ===
   −
Use a text editor or integrated development environment to create new source files or change existing files.  Test the results by running the activity.  Repeat until you are satisfied with the changes you made.
+
Use a text editor or integrated development environment to create new source files or change existing files.  Test the results by running the activity.  Do this from your local repository, or from elsewhere - then copy your files to the repository. Repeat until you are satisfied with the changes you made.
       
=== Commit Changes ===
 
=== Commit Changes ===
   −
Find out from git what files you changed:
+
Always in your local repository, find out from git what files you changed:
 
  git status
 
  git status
   Line 157: Line 159:  
You should do ''git pull'' frequently; before starting development, before pushing changes, and when you see other developers commit changes.
 
You should do ''git pull'' frequently; before starting development, before pushing changes, and when you see other developers commit changes.
    +
 +
=== For Further Information ===
 +
 +
There is an excellent chapter (chapter 11) on Git in the "Make Your Own Sugar
 +
Activities!" Floss manual by James Simmons: http://objavi.flossmanuals.net/books/ActivitiesGuideSugar-en-2010.08.30-15.48.49.pdf
 +
It is highly recommended for intermediate and advanced users.
    
== Other Notes ==
 
== Other Notes ==
3

edits