Changes

Jump to navigation Jump to search
126 bytes added ,  10:00, 17 September 2010
no edit summary
Line 1: Line 1:  
<noinclude>{{TeamHeader|Activity Team}}</noinclude>
 
<noinclude>{{TeamHeader|Activity Team}}</noinclude>
 
: '''[[Talk:Activity Team/Git FAQ | Post new questions here]]'''.
 
: '''[[Talk:Activity Team/Git FAQ | Post new questions here]]'''.
 +
==Using gitorious (git.sugarlabs.org)==
 
=== Help! I suddenly can't connect to Gitorious! ===
 
=== Help! I suddenly can't connect to Gitorious! ===
 
:The [http://osuosl.org/ OSUOSL], which hosts Gitorious, has an aggressive IP blacklist policy.  If you once were able to push but now cannot, send an email to support@osuosl.org requesting that your IP be removed from the blacklist.
 
:The [http://osuosl.org/ OSUOSL], which hosts Gitorious, has an aggressive IP blacklist policy.  If you once were able to push but now cannot, send an email to support@osuosl.org requesting that your IP be removed from the blacklist.
Line 37: Line 38:  
  git commit -a -m "I am the commit message"
 
  git commit -a -m "I am the commit message"
 
:to avoid opening an editor.
 
:to avoid opening an editor.
 +
 +
=== How do I add an additional committer to my project? ===
 +
 +
:Click on the Repositories Tab of the project page in Gitorious. Click on "Mainline". A link will appear on the right-hand side of the page saying, "Add Committer".
    
=== How do I create a fork of an existing project? ===
 
=== How do I create a fork of an existing project? ===
Line 64: Line 69:  
:Click on the Repositories Tab of the project page in Gitorious. Click on "Mainline". A link will appear on the right-hand side of the page saying, "Request merge".
 
:Click on the Repositories Tab of the project page in Gitorious. Click on "Mainline". A link will appear on the right-hand side of the page saying, "Request merge".
   −
=== How do I add a committer? ===
+
===Branch vs Repository===
   −
:Click on the Repositories Tab of the project page in Gitorious. Click on "Mainline". A link will appear on the right-hand side of the page saying, "Add Committer".
+
When you make a clone of a project on gitorious, it creates a "repository". You can see the list of repositories associated with a project by clicking on the Repository Tab. Branches are clones within a repository (created with git branch and accessed through git checkout). Git merge commands refer to branches, not repositories, so in order to merge a repository back into mainline, you need to pull (fetch followed by merge) it as if it were a patch.
   −
=== How do I get translations for my project? ===
+
git merge [your repository name]  # This won't work
   −
# Use the gettext mechanism for your stings.
+
git pull [git://git.sugarlabs.org/[your project name]/[your repository name].git master  # This will work
# Use <code>python setup.py genpot</code> to generate a .pot file for your project.
  −
# Fill a ticket requesting that your POT file be added to Pootle. Assign the ticket to "Localization".
  −
# Add User Pootle to the list of committers on your project.
     −
=== What if my project has a binary blob? ===
+
===How do I select which branch I am working on?===
   −
:You may have to use the --force flag.
+
git checkout master
   −
  git push -fv
+
  git checkout sucrose-0.84
   −
=== How do I stay in sync with translations being pushed from the Pootle server? ===
+
===How do I merge changes from master into a branch?===
   −
:Periodically—in my experience, on Fridays—updates to the project .po files are pushed from the Localization team.
+
git checkout sucrose-0.84
 
+
git rebase master
:Use <code> git-pull </code> to periodically pull these updates to the local copy of your project.
  −
 
  −
:Also, run <code>python setup.py fix_manifest</code> to update the .mo files after updating the .po files
     −
:'''Note:''' After every major release, a new branch is created on the Pootle server, e.g., Fructose-0.82 and Fructose-0.84. The Localization team may push translations to any or all of the corresponding branches of your project. Changes to your master branch are not necessarily intended for the release branches.
+
==Patches==
 
  −
=== How do my string changes get into Pootle? ===
  −
 
  −
Any changes to your project's .pot file are daily pulled into Pootle from git. All you have to do as a developer is make to regenerate your pot file whenever you make string changes.
  −
 
  −
setup.py genpot
  −
git commit po/Myproject.pot -m "new strings"
  −
git push
  −
 
  −
=== How do I update the Tag field in Gitorious? ===
  −
 
  −
git tag -m "Release 36" v36 HEAD
  −
git push --tags
      
=== As a maintainer, how do I merge a patch? ===
 
=== As a maintainer, how do I merge a patch? ===
Line 116: Line 102:  
  git format-patch -s -1
 
  git format-patch -s -1
 
  git send-email --to <maintainer> --cc <mailing-list> <filename>
 
  git send-email --to <maintainer> --cc <mailing-list> <filename>
  −
===How do I select which branch I am working on?===
  −
  −
git checkout master
  −
  −
git checkout sucrose-0.84
  −
  −
===How do I merge changes from master into a branch?===
  −
  −
git checkout sucrose-0.84
  −
git rebase master
      
=== How do I generate a patch? ===
 
=== How do I generate a patch? ===
Line 144: Line 119:     
  sudo yum -y install git-email
 
  sudo yum -y install git-email
 +
 +
==Internationalization work flow==
 +
 +
=== How do I get translations for my project? ===
 +
 +
# Use the gettext mechanism for your stings.
 +
# Use <code>python setup.py genpot</code> to generate a .pot file for your project.
 +
# Fill a ticket requesting that your POT file be added to Pootle. Assign the ticket to "Localization".
 +
# Add User Pootle to the list of committers on your project.
 +
 +
=== How do I stay in sync with translations being pushed from the Pootle server? ===
 +
 +
:Periodically—in my experience, on Fridays—updates to the project .po files are pushed from the Localization team.
 +
 +
:Use <code> git-pull </code> to periodically pull these updates to the local copy of your project.
 +
 +
:Also, run <code>python setup.py fix_manifest</code> to update the .mo files after updating the .po files
 +
 +
:'''Note:''' After every major release, a new branch is created on the Pootle server, e.g., Fructose-0.82 and Fructose-0.84. The Localization team may push translations to any or all of the corresponding branches of your project. Changes to your master branch are not necessarily intended for the release branches.
 +
 +
=== How do my string changes get into Pootle? ===
 +
 +
Any changes to your project's .pot file are daily pulled into Pootle from git. All you have to do as a developer is make to regenerate your pot file whenever you make string changes.
 +
 +
setup.py genpot
 +
git commit po/Myproject.pot -m "new strings"
 +
git push
 +
 +
==Misc.==
 +
 +
=== What if my project has a binary blob? ===
 +
 +
:You may have to use the --force flag.
 +
 +
git push -fv
 +
 +
=== How do I update the Tag field in Gitorious? ===
 +
 +
git tag -m "Release 36" v36 HEAD
 +
git push --tags
    
===Commit access behind firewall===
 
===Commit access behind firewall===
Line 171: Line 186:  
Check that your email address on git.sugarlabs.org account page is the same like in [[Activity_Team/Git_Tutorial#Initialize_git_global_settings|global git settings]] or in local repository setting (if you set user.email once):
 
Check that your email address on git.sugarlabs.org account page is the same like in [[Activity_Team/Git_Tutorial#Initialize_git_global_settings|global git settings]] or in local repository setting (if you set user.email once):
 
  git config user.email
 
  git config user.email
  −
===Branch vs Repository===
  −
  −
When you make a clone of a project on gitorious, it creates a "repository". You can see the list of repositories associated with a project by clicking on the Repository Tab. Branches are clones within a repository (created with git branch and accessed through git checkout). Git merge commands refer to branches, not repositories, so in order to merge a repository back into mainline, you need to pull (fetch followed by merge) it as if it were a patch.
  −
  −
git merge [your repository name]  # This won't work
  −
  −
git pull [git://git.sugarlabs.org/[your project name]/[your repository name].git master  # This will work
      
=== New activity maintainer walkthrough ===
 
=== New activity maintainer walkthrough ===

Navigation menu