Changes

Jump to navigation Jump to search
no edit summary
Line 5: Line 5:  
Getting started with Gitorious, a web based Git service used by Sugar Labs.
 
Getting started with Gitorious, a web based Git service used by Sugar Labs.
   −
=== Create an account ===
+
=== Create an Account ===
Create an account on git.sugarlabs.org by selecting the ''register'' link on the page.
+
Create an account on git.sugarlabs.org by selecting the ''register'' link on the page. You will be asked:
 
  −
You will be asked:
   
*Login
 
*Login
 
*Email
 
*Email
Line 15: Line 13:     
Fill the fields and press SIGN UP.  Gitorious will send you a confirmation email.  Check your email, wait for the confirmation, and follow the link provided.
 
Fill the fields and press SIGN UP.  Gitorious will send you a confirmation email.  Check your email, wait for the confirmation, and follow the link provided.
 +
 +
Once you do this, Gitorious knows who you are and how to contact you.  You should only need to do this once.
    
=== Create SSH Key ===
 
=== Create SSH Key ===
Line 30: Line 30:  
  -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
    +
=== 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, 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.
+
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.
    
(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>.)
Line 51: Line 52:  
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.
   −
Once this step is done, Gitorious will have created a git repository at Sugar Labs.
+
Once this step is done, Gitorious will have created a git repository at Sugar Labs.  You must only do this once for each project.
    
=== Create Local Repository ===
 
=== Create Local Repository ===
    
Clone it from Gitorious:
 
Clone it from Gitorious:
  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 ''${SLUG}'' substring with your project slug value.
   −
=== Initialize git global settings ===
+
You should only need to do this once for each project and system.  But you can do it again safely.
   −
Git must know your email and name.  It uses this when you commit a change, so that when you push or mail it others will know who did it.
+
=== Identify Yourself to Git ===
 +
 
 +
Git on your local system must know your email and name.  It uses this when you commit a change, so that when you push or mail it others will know who did it.
    
If you do not use git on your system for any other project, you can configure git:
 
If you do not use git on your system for any other project, you can configure git:
Line 68: Line 71:  
  git config -f ~/.gitconfig user.email <email-you-used-for-registering-project>
 
  git config -f ~/.gitconfig user.email <email-you-used-for-registering-project>
 
  git config -f ~/.gitconfig user.name <your-name>
 
  git config -f ~/.gitconfig user.name <your-name>
 +
 +
You should only need to do this once on a system.
    
Otherwise, configure git in the repository:
 
Otherwise, configure git in the repository:
Line 74: Line 79:  
  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>
 +
 +
You should only need to do this once in a repository.
    
=== Add source files or change existing files ===
 
=== Add source files or change existing files ===
 +
 +
You should do this for every set of changes you make.
    
=== Commit changes ===
 
=== Commit changes ===
 +
 +
You should do this for every set of changes you make.
    
=== Request review of changes ===
 
=== Request review of changes ===
Line 86: Line 97:     
  git send-email
 
  git send-email
 +
 +
You may do this for every set of changes you make.
    
=== Push changes ===
 
=== Push changes ===
Line 92: Line 105:     
  git push
 
  git push
 +
 +
You should do this for every set of changes you make, when you want to synchronise with other developers or prepare for a release.
    
=== Pull changes ===
 
=== Pull changes ===
Line 99: Line 114:  
Use
 
Use
 
  git-pull
 
  git-pull
to periodically pull pootle updates to the project .po files (every Friday?)
      
Also, run
 
Also, run
 
  python setup.py fix_manifest
 
  python setup.py fix_manifest
 
to update the .mo files after updating the .po files
 
to update the .mo files after updating the .po files
 +
 +
You should do this frequently; before starting development, before pushing changes, and when you see other developers commit changes.
    
----
 
----
Line 121: Line 137:  
A few notes re moving to the Sugar Labs infrastructure:
 
A few notes re moving to the Sugar Labs infrastructure:
   −
* use git init to create a new project
+
* use git init to create a new project unless it already exists
    
* source packages now go in
 
* source packages now go in

Navigation menu