Re: Deficiency in Git Walkthrough for translators http://live.gnome.org/GitMigration/Translators



Hi Александър,

Indeed, we need to add a section for branches.

Here is a draft (comments welcome, especially that can simplify the
explanation):


When you clone a repository with ```git clone```, you download the
necessary files for what we used to call HEAD only. This is shown by
default as ```master``` in your local repository.
You can verify with

{{{
$ git branch
* master
$ _
}}}

How can you view the available remote branches, so that you can
checkout later? You use the ```-a``` parameter in ```git branch``` in
order to show All available branches, both local and remote.

{{{
$ git branch -a
* master
  origin/HEAD
  origin/PITIVI_0_10
  origin/PITIVI_0_11
  origin/PITIVI_SOC_2007
  origin/SOC_2008_BLEWIS
  origin/SOC_2008_IAMER
  origin/SOC_2008_SLAKSHMAN
  origin/master
  origin/tags/PITIVI-0_10_3
  origin/tags/RELEASE-0_10_0
  origin/tags/RELEASE-0_10_1
...
$ _
}}}

Let's assume we want to submit a translation at the origin/PITIVI_0_11
branch. We would find the proper branch name from l10n.gnome.org. We
need to checkout that branch into our local repository.

{{{
$ git checkout --track origin/PITIVI_0_11
Branch PITIVI_0_11 set up to track remote branch
refs/remotes/origin/PITIVI_0_11.
Switched to a new branch "PITIVI_0_11"
$ _
}}}

Now, we checked out and switched to the PITIVI_0_11 branch. Let's verify,

{{{
$ git branch
* PITIVI_0_11
  master
$ _
}}}

At this stage, we can update our translation and commit it in our
local repository. See the relevant section in this web page.

Finally, let's push the changes upstream.

{{{
$ git push
Counting objects: 6, done.
Delta compression using 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 337 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
To ssh://MYUSERNAME git gnome org/git/pitivi
   2bb284a..519c40c  PITIVI_0_11 -> PITIVI_0_11
$ _
}}}

Let's verify again which branch is active,
{{{
$ git branch
* PITIVI_0_11
  master
$ _
}}}

Let's switch back to master and keep the repository for the next
translation update.

{{{
$ git checkout master
Switched to branch "master"
$ git branch
  PITIVI_0_11
* master
$ _
}}}

Simos

On Fri, Feb 20, 2009 at 5:56 AM, Александър Шопов <ash contact bg> wrote:
> Hi guys,
>
> As far as I understand following the instructions there will make me
> push to HEAD of master of the repositories on git.gnome.org
>
> However between releases Bulgarian team makes bugfixes to both the
> development release (master) and to the stable release - some
> number-dot-even-number branch. How do I switch to that remote branch and
> push to it?
>
> Kind regards:
> al_shopov
>
> _______________________________________________
> gnome-i18n mailing list
> gnome-i18n gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-i18n
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]