Changes

no edit summary
Line 1: Line 1:  
<noinclude>{{GoogleTrans-en}}{{TeamHeader|Activity Team}}{{TOCright}}</noinclude>
 
<noinclude>{{GoogleTrans-en}}{{TeamHeader|Activity Team}}{{TOCright}}</noinclude>
 +
    
== Gitorious ==
 
== Gitorious ==
Line 10: Line 11:  
* create a project, a local repository, and identify yourself to git, which you do once per project,
 
* create a project, a local repository, and identify yourself to git, which you do once per project,
 
* add source files, change existing source files, commit changes, push changes, and pull changes, which you do regularly.
 
* add source files, change existing source files, commit changes, push changes, and pull changes, which you do regularly.
 +
    
=== Create an Account ===
 
=== Create an Account ===
 +
 
Create an account on git.sugarlabs.org by selecting the ''Register'' link on the page.  You will be asked:
 
Create an account on git.sugarlabs.org by selecting the ''Register'' link on the page.  You will be asked:
 
*Login
 
*Login
Line 21: 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.
 +
    
=== Create SSH Key ===
 
=== Create SSH Key ===
Line 40: Line 44:     
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.  If you do it again, you must also add the new key to Gitorious 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, and then paste it into the text entry field.  Click on ''Save''.
   Line 53: Line 59:  
* until the patent expired, RSA could not be used in some countries,
 
* until the patent expired, RSA could not be used in some countries,
 
* some countries have laws against consumer use of encryption.
 
* some countries have laws against consumer use of encryption.
 +
    
=== Create a Project ===  
 
=== Create a Project ===  
Line 64: Line 71:     
Once this step is done, Gitorious will have created a git repository at Sugar Labs.  You must only do this once for each project.
 
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 ===
Line 73: Line 81:     
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.
 +
    
=== Identify Yourself to Git ===
 
=== Identify Yourself to Git ===
Line 93: Line 102:  
You should only need to do this once in a repository.
 
You should only need to do this once in a repository.
   −
=== Add source files or change existing files ===
+
 
 +
=== 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.  Repeat until you are satisfied with the changes you made.
   −
=== Commit changes ===
      +
=== Commit Changes ===
 +
 +
Find out from git what files you changed:
 +
git status
 +
 +
Add any files that are new or changed:
 
  git add ...
 
  git add ...
 +
 +
Tell git to collect the changes into a commit:
 
  git commit
 
  git commit
   −
You should do this for every set of changes you make.
+
You should do this for every meaningful set of changes you make.
   −
=== Request review of changes ===
+
 
 +
=== Request Review ===
    
Before you publish changes widely, you can ask others to review your work and comment on it.
 
Before you publish changes widely, you can ask others to review your work and comment on it.
Line 116: Line 134:  
You may do this for every set of changes you make.
 
You may do this for every set of changes you make.
   −
=== Push changes ===
     −
Your changes have to be pushed from your local repository to git.sugarlabs.org so that others can see them there.
+
=== Push Changes ===
 +
 
 +
Your changes have to be pushed from your local repository to the repository at git.sugarlabs.org so that others can see them there.
    
  git push
 
  git push
Line 124: Line 143:  
You must do this for every set of changes you make, when you want to synchronise with other developers or prepare for a release.
 
You must 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 ===
    
Others, including pootle, may add changes to the repository at git.sugarlabs.org.  You must merge these with your repository.
 
Others, including pootle, may add changes to the repository at git.sugarlabs.org.  You must merge these with your repository.
Line 135: Line 155:  
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.
+
You should do ''git pull'' frequently; before starting development, before pushing changes, and when you see other developers commit changes.
 +
 
 +
 
 +
== Other Notes ==
   −
----
+
=== Tags ===
    
alsroot taught me about another git feature: tags
 
alsroot taught me about another git feature: tags
Line 144: Line 167:  
  git push --tags
 
  git push --tags
   −
----
+
=== What Pull Does ===
    
bertf explained to me that git-pull does a combination of fetch and merge, so to merge a patch...
 
bertf explained to me that git-pull does a combination of fetch and merge, so to merge a patch...
Line 150: Line 173:  
  git pull git://git.sugarlabs.org/infoslicer/alsroots-clone.git master
 
  git pull git://git.sugarlabs.org/infoslicer/alsroots-clone.git master
    +
=== Moving to Sugar Labs ===
    
A few notes re moving to the Sugar Labs infrastructure:
 
A few notes re moving to the Sugar Labs infrastructure: