<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abhunkin</id>
	<title>Sugar Labs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abhunkin"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/go/Special:Contributions/Abhunkin"/>
	<updated>2026-06-13T07:09:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Activity_Team/Git_Tutorial&amp;diff=60499</id>
		<title>Activity Team/Git Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Activity_Team/Git_Tutorial&amp;diff=60499"/>
		<updated>2010-12-30T23:33:53Z</updated>

		<summary type="html">&lt;p&gt;Abhunkin: /* Other Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{GoogleTrans-en}}{{TeamHeader|Activity Team}}{{TOCright}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gitorious ==&lt;br /&gt;
&lt;br /&gt;
Getting started with Gitorious, a web based Git service provided by Sugar Labs.&lt;br /&gt;
&lt;br /&gt;
You will learn to:&lt;br /&gt;
* create an account, which you do once,&lt;br /&gt;
* create and add an SSH key, which you do once or if you change system,&lt;br /&gt;
* create a project, a local repository, and identify yourself to git, which you do once per project,&lt;br /&gt;
* add source files, change existing source files, commit changes, push changes, and pull changes, which you do regularly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create an Account ===&lt;br /&gt;
&lt;br /&gt;
Create an account on git.sugarlabs.org by selecting the &#039;&#039;Register&#039;&#039; link on the page.  You will be asked:&lt;br /&gt;
*Login&lt;br /&gt;
*Email&lt;br /&gt;
*Password&lt;br /&gt;
*Password Confirmation&lt;br /&gt;
&lt;br /&gt;
Fill the fields and press &#039;&#039;SIGN UP&#039;&#039;.  Gitorious will send you a confirmation email.  Check your email, wait for the confirmation, and follow the link provided.&lt;br /&gt;
&lt;br /&gt;
Once you do this, Gitorious knows who you are and how to contact you.  You should only need to do this once.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to login to Gitorious whenever you want to do any of the actions described here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create SSH Key ===&lt;br /&gt;
&lt;br /&gt;
Skip this section if you already have an SSH key in &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory that you trust.&lt;br /&gt;
&lt;br /&gt;
To create a key use &#039;&#039;ssh-keygen&#039;&#039;. The following command will create a “dsa” key:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
&lt;br /&gt;
For creating a “rsa” key use:&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
The key will be stored as two files in the hidden &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;id_dsa.pub&amp;lt;/tt&amp;gt; is your public key.  &amp;lt;tt&amp;gt;id_dsa&amp;lt;/tt&amp;gt; is your private key.  Only you should have access to this private key.  Access to the key will grant access to Gitorious in your name.  For example, here is a list of files in the &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory of user strom:&lt;br /&gt;
 ls -al ~/.ssh&lt;br /&gt;
 -rw-------   1 strom strom  668 2009-12-17 21:51 id_dsa&lt;br /&gt;
 -rw-r--r--   1 strom strom  603 2009-12-17 21:51 id_dsa.pub&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;change to another system&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add SSH Key ===&lt;br /&gt;
&lt;br /&gt;
Log in to http://git.sugarlabs.org/ click on &#039;&#039;Dashboard&#039;&#039;, then &#039;&#039;Manage SSH&#039;&#039;, then &#039;&#039;Add SSH key&#039;&#039;.  The &#039;&#039;Add a new public SSH key&#039;&#039; 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 &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
(With ssh-keygen you can specify the name of your key file. Using this feature is not a good idea, because we haven&#039;t tested it. Keys should generally be located in &amp;lt;tt&amp;gt;~/.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa.pub&amp;lt;/tt&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
ToDo: Do keys protected with a passphrase work together with GIT?&lt;br /&gt;
&lt;br /&gt;
ToDo: What is the difference between DSA and RSA keys?&lt;br /&gt;
* until the patent expired, RSA could not be used in some countries,&lt;br /&gt;
* some countries have laws against consumer use of encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create a Project === &lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;Create a new project&#039;&#039; link on the &#039;&#039;Projects&#039;&#039; page, and enter:&lt;br /&gt;
*Title&lt;br /&gt;
*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)&lt;br /&gt;
*License (this is the same as the one described at the beginning of your primary python file)&lt;br /&gt;
*Description&lt;br /&gt;
then click on &#039;&#039;Create project&#039;&#039;.  There several other question which can be answered later as you have more information.&lt;br /&gt;
&lt;br /&gt;
Once this step is done, Gitorious will have created a git repository at Sugar Labs.  You must only do this once for each project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create Local Repository ===&lt;br /&gt;
&lt;br /&gt;
Clone it from Gitorious:&lt;br /&gt;
 git clone gitorious@git.sugarlabs.org:${SLUG}/mainline.git ${SLUG}.git&lt;br /&gt;
&lt;br /&gt;
Replace the &#039;&#039;${SLUG}&#039;&#039; substring with your project slug value. Your local repository (folder) is now named &amp;lt;your-slug-name&amp;gt;.git&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Identify Yourself to Git ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you do not use git on your system for any other project, you can configure git:&lt;br /&gt;
&lt;br /&gt;
 git config -f ~/.gitconfig user.email &amp;lt;email-you-used-for-registering-project&amp;gt;&lt;br /&gt;
 git config -f ~/.gitconfig user.name &amp;lt;your-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should only need to do this once on a system.&lt;br /&gt;
&lt;br /&gt;
Otherwise, configure git in the repository:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your-slug-name&amp;gt;.git&lt;br /&gt;
 git config user.email &amp;lt;email-you-used-for-registering-project&amp;gt;&lt;br /&gt;
 git config user.name &amp;lt;your-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should only need to do this once in a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Develop ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Commit Changes ===&lt;br /&gt;
&lt;br /&gt;
Always in your local repository, find out from git what files you changed:&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
Add any files that are new or changed:&lt;br /&gt;
 git add ...&lt;br /&gt;
&lt;br /&gt;
Tell git to collect the changes into a commit:&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
You should do this for every meaningful set of changes you make.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Request Review ===&lt;br /&gt;
&lt;br /&gt;
Before you publish changes widely, you can ask others to review your work and comment on it.&lt;br /&gt;
&lt;br /&gt;
 git format-patch -1&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 git send-email&lt;br /&gt;
&lt;br /&gt;
You may do this for every set of changes you make.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Push Changes ===&lt;br /&gt;
&lt;br /&gt;
Your changes have to be pushed from your local repository to the repository at git.sugarlabs.org so that others can see them there.&lt;br /&gt;
&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
You must do this for every set of changes you make, when you want to synchronise with other developers or prepare for a release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pull Changes ===&lt;br /&gt;
&lt;br /&gt;
Others, including pootle, may add changes to the repository at git.sugarlabs.org.  You must merge these with your repository.&lt;br /&gt;
&lt;br /&gt;
Use&lt;br /&gt;
 git-pull&lt;br /&gt;
&lt;br /&gt;
Also, run&lt;br /&gt;
 python setup.py fix_manifest&lt;br /&gt;
to update the .mo files after updating the .po files&lt;br /&gt;
&lt;br /&gt;
You should do &#039;&#039;git pull&#039;&#039; frequently; before starting development, before pushing changes, and when you see other developers commit changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== For Further Information ===&lt;br /&gt;
&lt;br /&gt;
There is an excellent chapter (chapter 11) on Git in the &amp;quot;Make Your Own Sugar&lt;br /&gt;
Activities!&amp;quot; Floss manual by James Simmons: http://objavi.flossmanuals.net/books/ActivitiesGuideSugar-en-2010.08.30-15.48.49.pdf&lt;br /&gt;
It is highly recommended for intermediate and advanced users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
alsroot taught me about another git feature: tags&lt;br /&gt;
&lt;br /&gt;
 git tag -m &amp;quot;Release 36&amp;quot; v36 HEAD&lt;br /&gt;
 git push --tags&lt;br /&gt;
&lt;br /&gt;
=== What Pull Does ===&lt;br /&gt;
&lt;br /&gt;
bertf explained to me that git-pull does a combination of fetch and merge, so to merge a patch...&lt;br /&gt;
&lt;br /&gt;
 git pull git://git.sugarlabs.org/infoslicer/alsroots-clone.git master&lt;br /&gt;
&lt;br /&gt;
[[Category:Activity Team]]&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Abhunkin</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Activity_Team/Git_Tutorial&amp;diff=60498</id>
		<title>Activity Team/Git Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Activity_Team/Git_Tutorial&amp;diff=60498"/>
		<updated>2010-12-30T23:30:50Z</updated>

		<summary type="html">&lt;p&gt;Abhunkin: /* Gitorious */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{GoogleTrans-en}}{{TeamHeader|Activity Team}}{{TOCright}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gitorious ==&lt;br /&gt;
&lt;br /&gt;
Getting started with Gitorious, a web based Git service provided by Sugar Labs.&lt;br /&gt;
&lt;br /&gt;
You will learn to:&lt;br /&gt;
* create an account, which you do once,&lt;br /&gt;
* create and add an SSH key, which you do once or if you change system,&lt;br /&gt;
* create a project, a local repository, and identify yourself to git, which you do once per project,&lt;br /&gt;
* add source files, change existing source files, commit changes, push changes, and pull changes, which you do regularly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create an Account ===&lt;br /&gt;
&lt;br /&gt;
Create an account on git.sugarlabs.org by selecting the &#039;&#039;Register&#039;&#039; link on the page.  You will be asked:&lt;br /&gt;
*Login&lt;br /&gt;
*Email&lt;br /&gt;
*Password&lt;br /&gt;
*Password Confirmation&lt;br /&gt;
&lt;br /&gt;
Fill the fields and press &#039;&#039;SIGN UP&#039;&#039;.  Gitorious will send you a confirmation email.  Check your email, wait for the confirmation, and follow the link provided.&lt;br /&gt;
&lt;br /&gt;
Once you do this, Gitorious knows who you are and how to contact you.  You should only need to do this once.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to login to Gitorious whenever you want to do any of the actions described here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create SSH Key ===&lt;br /&gt;
&lt;br /&gt;
Skip this section if you already have an SSH key in &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory that you trust.&lt;br /&gt;
&lt;br /&gt;
To create a key use &#039;&#039;ssh-keygen&#039;&#039;. The following command will create a “dsa” key:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
&lt;br /&gt;
For creating a “rsa” key use:&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
The key will be stored as two files in the hidden &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;id_dsa.pub&amp;lt;/tt&amp;gt; is your public key.  &amp;lt;tt&amp;gt;id_dsa&amp;lt;/tt&amp;gt; is your private key.  Only you should have access to this private key.  Access to the key will grant access to Gitorious in your name.  For example, here is a list of files in the &amp;lt;tt&amp;gt;.ssh&amp;lt;/tt&amp;gt; directory of user strom:&lt;br /&gt;
 ls -al ~/.ssh&lt;br /&gt;
 -rw-------   1 strom strom  668 2009-12-17 21:51 id_dsa&lt;br /&gt;
 -rw-r--r--   1 strom strom  603 2009-12-17 21:51 id_dsa.pub&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;change to another system&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add SSH Key ===&lt;br /&gt;
&lt;br /&gt;
Log in to http://git.sugarlabs.org/ click on &#039;&#039;Dashboard&#039;&#039;, then &#039;&#039;Manage SSH&#039;&#039;, then &#039;&#039;Add SSH key&#039;&#039;.  The &#039;&#039;Add a new public SSH key&#039;&#039; 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 &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
(With ssh-keygen you can specify the name of your key file. Using this feature is not a good idea, because we haven&#039;t tested it. Keys should generally be located in &amp;lt;tt&amp;gt;~/.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa.pub&amp;lt;/tt&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
ToDo: Do keys protected with a passphrase work together with GIT?&lt;br /&gt;
&lt;br /&gt;
ToDo: What is the difference between DSA and RSA keys?&lt;br /&gt;
* until the patent expired, RSA could not be used in some countries,&lt;br /&gt;
* some countries have laws against consumer use of encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create a Project === &lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;Create a new project&#039;&#039; link on the &#039;&#039;Projects&#039;&#039; page, and enter:&lt;br /&gt;
*Title&lt;br /&gt;
*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)&lt;br /&gt;
*License (this is the same as the one described at the beginning of your primary python file)&lt;br /&gt;
*Description&lt;br /&gt;
then click on &#039;&#039;Create project&#039;&#039;.  There several other question which can be answered later as you have more information.&lt;br /&gt;
&lt;br /&gt;
Once this step is done, Gitorious will have created a git repository at Sugar Labs.  You must only do this once for each project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create Local Repository ===&lt;br /&gt;
&lt;br /&gt;
Clone it from Gitorious:&lt;br /&gt;
 git clone gitorious@git.sugarlabs.org:${SLUG}/mainline.git ${SLUG}.git&lt;br /&gt;
&lt;br /&gt;
Replace the &#039;&#039;${SLUG}&#039;&#039; substring with your project slug value. Your local repository (folder) is now named &amp;lt;your-slug-name&amp;gt;.git&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Identify Yourself to Git ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you do not use git on your system for any other project, you can configure git:&lt;br /&gt;
&lt;br /&gt;
 git config -f ~/.gitconfig user.email &amp;lt;email-you-used-for-registering-project&amp;gt;&lt;br /&gt;
 git config -f ~/.gitconfig user.name &amp;lt;your-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should only need to do this once on a system.&lt;br /&gt;
&lt;br /&gt;
Otherwise, configure git in the repository:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your-slug-name&amp;gt;.git&lt;br /&gt;
 git config user.email &amp;lt;email-you-used-for-registering-project&amp;gt;&lt;br /&gt;
 git config user.name &amp;lt;your-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should only need to do this once in a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Develop ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Commit Changes ===&lt;br /&gt;
&lt;br /&gt;
Always in your local repository, find out from git what files you changed:&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
Add any files that are new or changed:&lt;br /&gt;
 git add ...&lt;br /&gt;
&lt;br /&gt;
Tell git to collect the changes into a commit:&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
You should do this for every meaningful set of changes you make.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Request Review ===&lt;br /&gt;
&lt;br /&gt;
Before you publish changes widely, you can ask others to review your work and comment on it.&lt;br /&gt;
&lt;br /&gt;
 git format-patch -1&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 git send-email&lt;br /&gt;
&lt;br /&gt;
You may do this for every set of changes you make.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Push Changes ===&lt;br /&gt;
&lt;br /&gt;
Your changes have to be pushed from your local repository to the repository at git.sugarlabs.org so that others can see them there.&lt;br /&gt;
&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
You must do this for every set of changes you make, when you want to synchronise with other developers or prepare for a release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pull Changes ===&lt;br /&gt;
&lt;br /&gt;
Others, including pootle, may add changes to the repository at git.sugarlabs.org.  You must merge these with your repository.&lt;br /&gt;
&lt;br /&gt;
Use&lt;br /&gt;
 git-pull&lt;br /&gt;
&lt;br /&gt;
Also, run&lt;br /&gt;
 python setup.py fix_manifest&lt;br /&gt;
to update the .mo files after updating the .po files&lt;br /&gt;
&lt;br /&gt;
You should do &#039;&#039;git pull&#039;&#039; frequently; before starting development, before pushing changes, and when you see other developers commit changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== For Further Information ===&lt;br /&gt;
&lt;br /&gt;
There is an excellent chapter (chapter 11) on Git in the &amp;quot;Make Your Own Sugar&lt;br /&gt;
Activities!&amp;quot; Floss manual by James Simmons: http://objavi.flossmanuals.net/books/ActivitiesGuideSugar-en-2010.08.30-15.48.49.pdf&lt;br /&gt;
It is highly recommended for intermediate and advanced users.&lt;br /&gt;
&lt;br /&gt;
== Other Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
&lt;br /&gt;
alsroot taught me about another git feature: tags&lt;br /&gt;
&lt;br /&gt;
 git tag -m &amp;quot;Release 36&amp;quot; v36 HEAD&lt;br /&gt;
 git push --tags&lt;br /&gt;
&lt;br /&gt;
=== What Pull Does ===&lt;br /&gt;
&lt;br /&gt;
bertf explained to me that git-pull does a combination of fetch and merge, so to merge a patch...&lt;br /&gt;
&lt;br /&gt;
 git pull git://git.sugarlabs.org/infoslicer/alsroots-clone.git master&lt;br /&gt;
&lt;br /&gt;
[[Category:Activity Team]]&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Abhunkin</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Activity_Team/Object_Chooser&amp;diff=60457</id>
		<title>Activity Team/Object Chooser</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Activity_Team/Object_Chooser&amp;diff=60457"/>
		<updated>2010-12-27T22:11:11Z</updated>

		<summary type="html">&lt;p&gt;Abhunkin: /* The Sugar Object Chooser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Sugar Object Chooser ==&lt;br /&gt;
&lt;br /&gt;
The following example is modified from the FileMix activity. Note that it invokes the Chooser to select objects of mime type GENERIC_TYPE_AUDIO.&lt;br /&gt;
&lt;br /&gt;
 from sugar.graphics.objectchooser import ObjectChooser&lt;br /&gt;
 from sugar import mime&lt;br /&gt;
&lt;br /&gt;
 self.path = &amp;quot;0&amp;quot;&lt;br /&gt;
 self.jobject = None&lt;br /&gt;
&lt;br /&gt;
 # Determine which version of Sugar you are running&lt;br /&gt;
 try:&lt;br /&gt;
     from jarabe import config&lt;br /&gt;
     version = [int(i) for i in config.version.split(&#039;.&#039;)][:2]&lt;br /&gt;
 except ImportError:&lt;br /&gt;
     version = [0, 82]&lt;br /&gt;
&lt;br /&gt;
 if version &amp;gt;= [0, 84]:&lt;br /&gt;
     # Insert here code relevant to Sugar 0.84 and higher&lt;br /&gt;
     # I use this to only display Object Chooser callback buttons only for &amp;gt;= 0.84&lt;br /&gt;
     # Clicking one of the displayed buttons calls the choose method&lt;br /&gt;
&lt;br /&gt;
 def choose(self, widget):&lt;br /&gt;
     chooser = ObjectChooser(parent=self, what_filter=mime.GENERIC_TYPE_AUDIO)&lt;br /&gt;
     result = chooser.run()&lt;br /&gt;
     if result == gtk.RESPONSE_ACCEPT:&lt;br /&gt;
       self.jobject = chooser.get_selected_object()&lt;br /&gt;
       self.path = str(self.jobject.get_file_path())&lt;br /&gt;
     else:&lt;br /&gt;
       self.jobject = None&lt;br /&gt;
       self.path = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Random observations: ===&lt;br /&gt;
&lt;br /&gt;
# I exclude Sugar 0.82 for two reasons (which means, unfortunately, &amp;quot;no user soundfiles for 0.82&amp;quot;):&lt;br /&gt;
#* its version of Object Chooser does not allow filtering for the audio mime type;&lt;br /&gt;
#* Sugar 0.82&#039;s Csound (5.08) - or more specifically its version of libsndfile - does not handle ogg vorbis soundfiles, the type that the Record activity (later versions) creates. Record is the most likely/accessible means that children would use to create their own soundfiles. (The whole idea behind using Object Chooser here is to select user files that have been placed in the Journal [as Record does by default] for performance in FileMix.)&lt;br /&gt;
#* In addition, &#039;&#039;&#039;earlier&#039;&#039;&#039; versions of Record (&amp;lt;v76, except for v61-64)  create ogg &#039;&#039;&#039;speex&#039;&#039;&#039; soundfiles; even the recent versions of Csound (actually, libsndfile) do not handle this (lo-fi) format. (Unfortunately, &#039;&#039;no&#039;&#039; versions of Record [as of 12/10] produce any audio, &#039;&#039;except&#039;&#039; ogg speex, in Sugar &amp;gt; 0.84.)&lt;br /&gt;
# self.path stores the soundfile name (complete path); self.jobject stores the object itself. This is key to being able (in Csound) to locate and load the selected soundfile. self.path is then a channel opened to send the named soundfile to Csound.&lt;br /&gt;
# If the user closes the Object Chooser box instead of clicking on a sound object, the result is not accepted, and self.path reverts to &amp;quot;0&amp;quot; - which is a flag (in Csound) to revert to the default soundfile included in FileMix.&lt;br /&gt;
# The str() cast for self.path converts the filename to the usual path format readable by Csound (this too is required). Otherwise, the file_path is a dbus string object; maybe we need to cast this type in sugar-toolkit code (though in most cases this casting should happen implicitly).&lt;br /&gt;
&lt;br /&gt;
The above code is included in FileMix-4.xo, in filemix.py (where there are 4 Object Chooser methods triggered by 4 callback buttons). Source for this activity has been made visible online.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Art Hunkins and Aleksey Lim&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Abhunkin</name></author>
	</entry>
</feed>